Skip to main content

Questions tagged [integration-testing]

Filter by
Sorted by
Tagged with
3 votes
2 answers
1k views

Integration Testing Stripe Payments - stripe-mock or Stripe's test mode?

I'm building an automated test suite to integration/feature test my organization's Stripe implementation within a GitLab CI pipeline. We're running Laravel 8 and using phpunit for testing. Within this ...
0 votes
0 answers
45 views

How to handle integration tests for different stages

A test program should post a json object to a rest service OrderRequest and receives an OrderResponse. The test program should tests against the quality assurance stage (qa) and against the production ...
-3 votes
2 answers
327 views

Why are logs not used for testing? [closed]

In tests, state verification or collaboration verification is usually undertaken. One of the drawbacks of this approach is the coupling of tests to the design of constructs. Consequently, when ...
1 vote
2 answers
202 views

Is it possible to prove mathematically that unit testing reduces test effort as compared to integration testing? [closed]

I took out the request for a paper, thank you for spending so much time on this. hopefully this edit is better. I use the word "complexity" meaning "cyclomatic complexity" so if ...
0 votes
1 answer
296 views

Best practice when it comes to using XUnit and prepping/ rolling back test accounts before and after running tests

I am writing integration tests via unit tests by using Xunit. (the specific testing framework is not set in stone, Xunit is being used simply because it has been used before in this project team) The ...
3 votes
2 answers
340 views

the actual notion of an integration and end to end testing

I want to know how rigid do we have to stick to the notion of end to end testing, please consider the following explanation: Basically, when we talk about end to end test we send a request and expect ...
0 votes
4 answers
705 views

Should i write tests if it takes more time than testing manually?

Im making a website and trying to learn Test Driven Development (TDD) I'm doing one of CS50 projects, were we need to make a website to trade stocks. I decided to use this oportunity to learn TDD. I ...
3 votes
2 answers
3k views

Should you clean up your DB after integration tests?

Is it good practice to clean up your DB after running integration tests (which tests APIs that put data into that DB)? I want to have a cleanup method after my integration tests run which will access ...
1 vote
1 answer
1k views

Should integration tests cover calls from web app to API?

My solution consists of an API for data access and a web application that calls it. I have integration tests set up for the API. However, the actual Web application that calls the API is not a part of ...
0 votes
1 answer
77 views

Additional modules in unit tests

We have capital-U Unit Tests that are supposed to be testing a particular slice of our code. This code has a dependency on an IConverter<TIn, TOut> (a wrapper similar to AutoMapper). The ...
-1 votes
1 answer
134 views

How to test and what kinds of test to write for Request Handlers that use Repository layer?

Consider class below: class FillTestBySerialHandler { /** * * @var FillTestBySerialRepository */ private $fillTestBySerialRepository; function __construct(...
0 votes
2 answers
552 views

When writing tests against the database, should the test to create a resource also retrieve the resource to check the values were correctly inserted?

Where I work, we have some integration tests which spin up a new SQL database instance in Docker, so that we can test the repository logic for write actions as well as read actions. We have a test for ...
0 votes
2 answers
451 views

What if integration testing makes more sense than unit testing for a certain method?

I don't want to spam you with a ton of code, but please have a quick look at this boiler-plate method: In this scenario let's say I have a ProcessingText.py file (class) that I finished its unit ...
1 vote
2 answers
239 views

Is there a pattern for unit/integration testing where tests that are higher level are intended to act as "gates" for other more specific tests?

The motivating concept here is that the fewer tests you have, the faster your test suite runs. This kinda feels like I'm basically describing smoke tests, but I think smoke tests and other tests are ...
1 vote
5 answers
268 views

Hypothetically if every scenario were covered by an end-to-end tests, would unit tests still have any value?

Note: I'm asking about the strategy behind unit / integration / end-to-end tests, not about classifying tests as one or the other. More so in the past than present, it was expensive to write and run ...
4 votes
1 answer
5k views

Clean Architecture use case testing

Use case interactors in the Clean Architecture consists of the application specific business rules. Interactors uses the Data Access Interface to fetch the required data from the data access layer. ...
-3 votes
1 answer
119 views

How to test dependencies between microservices?

We have two microservices A and B that are developed inhouse. A provides an API that B consumes. Let's assume that B has some specific integration tests that ensure that B is compatible with A. We ...
1 vote
2 answers
1k views

Big Bang Integration Testing vs System Testing

In Big Bang Integration Testing, we combine all the modules we have together after unit testing immediately as one whole to see if there are errors. In System Testing, we basically test the whole ...
2 votes
3 answers
2k views

What is the proper logging level for tests?

I raised an issue at my employer concerning our gigantic heaps of testing logs. I raised the issue because I was spending well over a minute to find the relevant logs and stack-trace. I stated we ...
1 vote
3 answers
179 views

What would be an ideal unit test in this simple case?

I have a simple service that fetches an article from the repository. If it finds it then it returns it otherwise throws an exception. In short the function is totally dependent on the database ...
3 votes
2 answers
1k views

Should on each test create and nuke a testing database?

In my case I inherited a poorly engineered code, on that piece of code I have been tasked to increase the code coverage in integration tests. But instead of the usual pattern: Create/Populate a test ...
5 votes
4 answers
1k views

Should test code be treated as normal code? [duplicate]

I remember reading on someone else's post that test code should not be treated as normal code but as small whole programs and that is an idea I really like and would like to refer to when discussing ...
1 vote
3 answers
84 views

Monitoring write-intensive web service through submitting synthesized data?

We have a web service that accepts images and metadata uploaded by end users, and the uploaded images would go through multiple steps of processing / reviewing with human involved. To monitor the ...
-2 votes
1 answer
180 views

How can I unit test this code [closed]

How can I unit test a codebase which contains classes that includes two or three methods. In general these methods are too long. The methods contain lots of tasks like filtering datasets and a ...
3 votes
4 answers
687 views

Should outgoing messages from object under test be tested?

I was watching a recording of a conference by Sandi Metz on testing. One of the things that I struggled with was that she said not to test outputs of the object under test (her example was query ...
2 votes
1 answer
207 views

A performant and robust way to reset multiple files to its original state (TDD)

In our automated Java tests, we sometimes encounter issues, such as: Test A creates a custom file A.sh, that is then added on classpath Automated testsuite cleanup does not know about random file A....
0 votes
1 answer
1k views

If I am mocking API responses in my unit/integration tests, how do I guarantee that the contract between Service A and B are valid?

Let's say I have microservice A and B. Microservice A calls microservice B for some piece of information. Microservice B requires parameters 1, 2, and 4 for the request to be valid. If I'm simply ...
1 vote
2 answers
1k views

How do you unit test a microservice that makes a call to another microservice?

I have a suite of microservices: ConnectorRegistrar ConnectorTypeA ConnectorTypeB ... ConnectorTypeZ "Someone" can make a call to the ConnectorTypeA microservice to create a connector of type A, and ...
2 votes
1 answer
250 views

Keeping Stubs in Sync?

If I want to test frontend code (e.g. react SPA) that queries the backend and I stub out the responses from the backend using sinon fake server/fake XHR, then what happens if the backend code changes? ...
2 votes
2 answers
2k views

Is it a good idea to have individual data per integration test?

Is it a good idea to have individual/unique data sets for each integration test or should all tests reuse the same data? My idea for having individual data sets for each test is to have more control ...
0 votes
0 answers
285 views

Integration Testing a dynamic backend

Our company creates financial software that integrates into a banking system backend. We're running into a lot of problems making changes to it without seemingly impacting another customer or another ...
1 vote
1 answer
846 views

Integration VS System Testing on Embedded system demo

My company develops embedded systems and they have a project where they are developing a new platform which will be used to do demos for potential clients. They are introducing a new technological ...
6 votes
2 answers
4k views

Whether and how to test façades

In my application I have quite a few service classes that act as a façade and delegate most calls to one or more underlying manager classes. I've read very different opinions on how to test such ...
3 votes
4 answers
1k views

Unit testing Systems with Logic Tightly Coupled with Data

I understand there are many questions in this site revolving around the same concept, but I could not get a precise answer for my case. Problem I am handling an ERP System, with code base in both: ...
7 votes
1 answer
6k views

Integration vs Functional Testing

Alright....so this is driving me nuts as I'm trying to encourage the team to write more tests yet here I am unable to determine whether the following example is considered an integration or a ...
4 votes
2 answers
2k views

Where do I define WCF client endpoints in a test project?

I have a class library-- call it Services.dll-- which is a wrapper for some third party functionality. The third party gave us a bunch of DLLs and those "inner" DLLs call a WCF service. Normally, ...
8 votes
2 answers
3k views

Integration tests, but how much?

A recent debate within my team made me wonder. The basic topic is that how much and what shall we cover with functional/integration tests (sure, they are not the same but the example is dummy where it ...
5 votes
3 answers
760 views

Is it mandatory to run integration tests when deploying feature branches to QA machines

In our organaziton to make the testing process a QA can start the QA process by deploying a feature branch to a QA machine. My question is that while doing so should the build process include running ...
10 votes
3 answers
391 views

Is creating a completely duplicate system for quality assurance (QA) of another a bad practice?

At work we have a quite complicated system. Let's call this system, System_A. Our QA team has created another system, call this system, System_B, to test System_A. The way System_B is used is as ...
6 votes
1 answer
132 views

Best strategy for creating/updating CI build database

I was wondering what the best practice is regarding databases for integration tests on the build server. If there is a best practice. Currently, our build will create a new database from scratch for ...
2 votes
1 answer
3k views

Should integration test coverage allow for lower unit test code coverage? [duplicate]

If a project has 30% coverage by unit tests, 40% due to integration tests, is it fair to say the total is 70% as so moderately well covered? Or are unit tests only ever used as the standard test ...
0 votes
0 answers
88 views

Integration testing process for big applications

I've started to learn about approaches to integration testing in big enterprise applications (java based, spring, and everything :) ). So I saw two main approaches: Running parts of spring context ...
0 votes
1 answer
2k views

Sequence of Integration Test in Build Process

We are developing a Web API (ASP.net, C#) project and use Bamboo CI for our continuous Integration. We run the Unit test before the deployment task so that deployment does not happen if test fails. We ...
2 votes
2 answers
4k views

Do you have to use an in-memory db for integration testing? [closed]

I'm currently setting up integration testing for my company. I haven't done it before. We are developing a Java web application which uses MySQL as datasource. I know it is very common to use an in-...
1 vote
4 answers
809 views

Should I use TDD and BDD if my project is changing fast?

I have my own little project I am creating using RoR, I plan it to have small-medium load. With no doubt I started with BDD and TDD (Cucumber and RSpec to be exact, but I am also experienced with ...
3 votes
1 answer
1k views

Good approach/Strategy to keep integration test database in-sync with production db?

I'm building a web application in Spring. I'm using an in-memory (embedded) database for my integration test - HSQL My production database is MySQL. When i setup my integration tests a while back i ...
5 votes
2 answers
263 views

Is there a benefit to unit testing code whose sole purpose is to generate non-human-readable code in another language?

A significant portion of the application I work on every day consists of Javascript that outputs a lot of (what might as well be) Excel spreadsheet formulas. Yes, Excel is barely a Turing-complete ...
9 votes
6 answers
9k views

Are HSQLDB unit tests an anti pattern?

HSQLDB is great. It (also) has an embedded mode (no dedicated server needed), which allows for quick prototyping of stuff like Proof of Concepts, and it can also be great in production-ready ...
3 votes
1 answer
345 views

Rethinking testing strategy

Working on Plone projects our team tries to achieve full test coverage at least for important products. The kind of tests we write are unit tests, functional tests and integration tests. (Also stress-...
2 votes
3 answers
381 views

Writing selenium tests, should I just get it done or get it right?

I'm attempting to drive my user interface (heavy on javascript) through selenium. I've already tested the rest of my ajax interaction with selenium successfully. However, this one particular method ...