Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [integration-tests]

Integration testing is the phase in software testing in which individual software modules are combined and tested as a group. No mocks or stubs are required; everything is tested as in production.

Filter by
Sorted by
Tagged with
-1 votes
0 answers
47 views

Looking for ways to reproduce an environment where requests fail due to security or Proxy

It is assumed that the request is sent from an application in a browser. For example, when requesting fetch("https//example.com"), the following error may be observed (assuming basic ...
desertpureolive's user avatar
3 votes
3 answers
1k views

TDD when removing long lived feature

Suppose I had some Manager class that I need to change in regards to existing functionality by removing code. The Manager always sends an initial message after a connection was established to do an ...
Late347's user avatar
  • 55
-3 votes
1 answer
84 views

Testablilty of setup with builder pattern for configuration

We have built a library which can handle RESTful requests based on configured endpoints. A fluent builder is being used to create endpoint definitions (configurations). These definitions are bound to ...
Wilko van der Veen's user avatar
1 vote
2 answers
145 views

How to do integration testing with ServiceBus?

Generally speaking, the basic flow is: http triggered service method puts request on service bus service bus triggered method executes request and in this specific scenario: method from 2) sends ...
BVernon's user avatar
  • 483
1 vote
1 answer
82 views

How to test integration with an infinite generator

I'm struggling to (integration) test a component that makes use of an infinite generator. Background: At a really high level, this component is essentially a "middleman" in a kafka workflow. ...
Luke Nelson's user avatar
5 votes
5 answers
3k views

What to cover with integration tests?

I'm working on adding unit/integration tests to an existing project (Java/Spring Boot) and I've been investigating on how they are "separated" in order to cover the test cases and how to ...
leugimlenipse's user avatar
1 vote
2 answers
188 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 ...
Mister Jeps's user avatar
0 votes
4 answers
978 views

Testing for exception thrown, unit or integration test?

In a test, asserting if a simple method throws an exception under a certain circumstance, is such a test considered a unit or integration test when the exception object thrown is from the standard ...
Kid Diamond's user avatar
9 votes
5 answers
4k views

Which comes first: CD/Trunk-based development or microservices?

My company* wants to move from using long-running feature branching (~up to a few weeks) to continuous integration with trunk-based development, and to break up our monolith into microservices. We'...
Jacob Archambault's user avatar
2 votes
2 answers
560 views

Where do unit tests stop and integration tests begin according to the classical school of unit testing?

There are two schools of thought on how unit tests should be written. The first is the Classical/Chicago school, which focuses on the isolation of unit tests, describes a unit as a class or set of ...
B-Rad's user avatar
  • 203
0 votes
1 answer
88 views

Do we need to test an integration of units if each unit has been tested against collaborator (mocks) and interface contracts?

Given: Let's say I have 3 objects A, B, C that form a cluster. Each unit (A,B,C) is independently tested with mocked collaborators. The "integration" is the call to A that calls out to B and ...
PhD's user avatar
  • 2,511
1 vote
0 answers
84 views

How to structure an ERP system in a modular way, with module hierarchy and where do application layers stand in this?

I built an asset management system (a web application) using C# ASP.NET in MVC structure. My project is built upon the ASP.NET Boilerplate template, which includes 5 layers by default. These layers ...
Emre Can Serteli's user avatar
0 votes
3 answers
182 views

Tests of 1-Dependency VS Tests of 0-Dependency

How many dependencies does a unit test have (that are not mocked)? My understanding is that a true "unit test" has zero dependencies, with all of them mocked (or none in the first place; ...
Dave Cousineau's user avatar
0 votes
0 answers
78 views

Unit test coverage and abundant glue code [duplicate]

How do I solve this riddle of contradicting "good practices" to properly cover my app with unit-tests? These are principles I found about writing unit-tests: Pyramid of testing says unit-...
Gherman's user avatar
  • 945
0 votes
4 answers
610 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 ...
Portho Games BR's user avatar
4 votes
1 answer
2k views

Is performing integration tests on a production DB a bad practice?

I'm writing integration tests for an already existing product. I'm using the Spring Integration Testing suite for this purpose, which allows testing a real DB connection by creating a transaction and ...
Christian Vincenzo Traina's user avatar
0 votes
1 answer
1k views

Mock a bean with 10 methods when I only use one?

I face some situations similar to the following simplified one: @Component class ServiceOne { @Autowired ServiceTwo two; void act() { ... two.a(); ... } } @...
ch271828n's user avatar
  • 181
4 votes
2 answers
405 views

Testing interaction with proprietary software without a license

First a bit of context: My company develops a software and middlewares to make our software interacts with other software. One of a client has a proprietary software we should interact with, he gave ...
f222's user avatar
  • 1,030
0 votes
3 answers
947 views

Improve CI process by testing against docker image and fail docker build if test fails

Our CI process goes as this cycle (I think it is quite normal), unit test => build docker image => run function test against the image => if test fails remove the failed docker image, figure ...
Qiulang 邱朗's user avatar
-3 votes
1 answer
82 views

Registration feature integration testing(Acceptance Testing) [closed]

I would like to add integration testing/automated acceptance testing for a mobile app calling a registration API from the backend. I will register a sample user on the test feature then delete the ...
xitnesscomplex's user avatar
2 votes
1 answer
623 views

Should integration tests of a repository pattern use low-level ORM calls

Problem summary: In an application with wrapper methods over SQLAlchemy add() and query() methods, can integration tests that use the add() method wrapper use the query() method wrapper to validate ...
Ash's user avatar
  • 131
0 votes
2 answers
970 views

Should integration tests run after updating the feature branch from master?

We have a suite of integration tests that take about 2 hours to complete. Currently our flow is that each feature branch runs the integration tests, and only if the branch is updated from master and ...
Moshe Shaham's user avatar
1 vote
1 answer
476 views

Testing API with Auth0-enabled user authentication and authorization

I have a REST API and a SPA application, with Auth0 server issuing access tokens and enabling end users to login with their social identity provider. The API expects to receive a JWT access token with ...
0lt's user avatar
  • 113
0 votes
2 answers
266 views

Automated testing: should I check a sub-function was called, or should I check it's result?

I have a big function that does several things, including some database operations, and calling another smaller function. Something like: BigFunction() { DB.SomeTable.AddRow(newRow); ...
MGOwen's user avatar
  • 734
-2 votes
2 answers
92 views

Should application state be tested when testing Api?

I am trying to adpot a TDD process. I am a bit confused when it comes to testing an Api. I know for sure that the status and the response should be tested. But I am thinking if whether or not I should ...
Rami ZK's user avatar
  • 113
36 votes
3 answers
5k views

What is the point of repeatedly executing the same test?

I have recently learned about the not-well-known and not-widely-used annotation @RepeatedTest that, as the name implies, repeats the very same test n-times. Baeldung provides a short guide to this ...
Nikolas Charalambidis's user avatar
0 votes
1 answer
214 views

Isolated Integration Tests in Layered Software Architecture Pattern

Let's say we have a simple application that uses a popular approach as Controller -> Service -> Repository pattern under a framework. We would like to write integration tests and start from ...
memoricab's user avatar
  • 109
0 votes
1 answer
878 views

How to test a function with several conditional nested side effects

In Python, consider a function like the following: def main(*args): value1 = pure_function1(*args) if condition(value1): value = side_effect1(value1) if value: ...
pob's user avatar
  • 109
1 vote
2 answers
153 views

Is the use of third party software and network requests the motivation for integration testing?

I'm wondering if the use of third party software and/or network requests is the motivation for integration testing? For the sake of keeping the code examples minimal, I'll define a unit test as ...
tarstevs's user avatar
0 votes
2 answers
140 views

Platform that converts Documentation into Unit/Integration Tests? [closed]

I've seen many SO questions around auto-generating unit tests, or documenting unit tests, but I'd like to go the reverse direction. What I'd REALLY like is to have folks (devs, tech writers, etc) ...
aronchick's user avatar
  • 127
3 votes
1 answer
564 views

Setting up tests and a continuous integration pipeline in a polyrepo environment

In the past I've mainly worked with monorepos, specifically a Vue.js app that was served by a rails backend. Setting up E2E/integration tests in the CI was simple, because all the required parts were ...
Johannes Stricker's user avatar
0 votes
0 answers
140 views

Mock/Reality consistency : unit test or integration test?

In a golang project, I have mocked external services. But in order to check that mocked services has the same behaviour as real services, I have done some common testing on the interface with both ...
Lerenn's user avatar
  • 101
2 votes
3 answers
238 views

Given a function that has already been unit tested, but is present in another unit, should I bother testing it again?

Say, for instance, I have this simple function in my domain layer: function canCreateNewUsers (principal: User): boolean { return principal.isSuperAdmin || principal.isAdmin // || ... a bunch of ...
kibe's user avatar
  • 748
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 ...
Peter Dongan's user avatar
1 vote
2 answers
104 views

Where shall we start mocking?

Scenario: Our CLI-script downloads data Therefore, amongst other things such as pre/postprocessing, it calls a function from another (internal) python package (which is maintained by another group) ...
gebbissimo's user avatar
65 votes
5 answers
20k views

Is the usage of random values in unit testing a good practice? [duplicate]

Having worked in complex solutions that had Unit Tests and Integration Test in the CI/CD pipeline, I recall having a tough time with tests that failed randomly (either due to random values being ...
Vinicius Scheidegger's user avatar
0 votes
1 answer
89 views

Best practices for seperating/designing classes and methods for use in testing

I run unit and integration tests on my system. These create, start, stop and delete Docker containers. I want the exact same state in my Docker environment at the end of the tests as I had at the ...
slashleo's user avatar
-2 votes
1 answer
1k views

What's the reason for wiremock instead of Mockito in integration tests [closed]

I enjoyed the process of writing an integration test for a system that relies on http, by mocking such end-points with Wiremock, and I feel upskilled, having wrestled with Matchers. Now, Wiremock as a ...
HellishHeat's user avatar
2 votes
2 answers
462 views

Integration test ordering vs. before/after style setup/cleanup when one test is a subset of another

I'm aware that it's generally considered bad style to write tests that have to run in a particular order. Let's say I'm testing an account-management API, and have the following two integration tests: ...
Claire Nielsen's user avatar
5 votes
3 answers
1k views

Should unit tests assert the inputs to dependencies?

tl;dr: Is it a unit test or an integration test, to ensure that the inputs to a mocked dependency were correct? More details: Suppose I'm given a requirement like this: Create a function that returns ...
George T's user avatar
  • 295
1 vote
3 answers
2k views

Clarifying the steps in a CI/CD, but namely if if unit testing should be done building a Docker image or before

I'm building at a Build and Deployment pipeline and looking for clarification on a couple points. In addition, I'm trying to implement Trunk Based Development with short-lived branches. The process I ...
strumpy_strudel's user avatar
3 votes
1 answer
368 views

Efficiently updating a common repository used by multiple other repositories

Suppose we have a project consisting of many microservices, all of which use a common library. The common library has been put into a separate git repository, and each microservice is also in its own ...
Robin Green's user avatar
  • 1,263
20 votes
5 answers
2k views

How to test variable values which differ due to floating point inaccuracy caused by different DBMS types?

I am working on a program that needs to work on floating point values that are fetched from different database types: currently we support 12 different DBMS (for example, two of them are Sqlite3 and ...
Gofrette's user avatar
  • 333
3 votes
1 answer
126 views

How to test UI frameworks

I am currently working on a library that provides functionality for interactive terminal applications. For now, I implemented functionality for reading an arbitrary keypress from the User to the ...
writzlpfrimpft's user avatar
-2 votes
1 answer
80 views

Does the higher-level testing mentioned in the book "Working Effectively with Legacy Code" belong to integration tests?

In the book Working Effectively with Legacy Code , there is section Higher-Level Testing in Chapter 2 Working with Feedback: Unit tests are great, but there is a place for higher-level tests , tests ...
Rui's user avatar
  • 1,699
1 vote
1 answer
212 views

How can I write integration tests if I need dynamically generated values from a javscript file?

We have a react website that, as part of it's process, loads a dynamically generated javascript file from a third party. It uses some of the scripts in this javascript file to generate values, which ...
David Jacobsen's user avatar
0 votes
2 answers
434 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 ...
mft25's user avatar
  • 171
5 votes
2 answers
401 views

Doesn't "Always test through the public interface" contradict testing of individual composed functions?

I'm currently reading "Composing Software" by Eric Elliott, which is about functional programming in JavaScript. He states that if you compose multiple functions together, and that these ...
user1474326's user avatar
-1 votes
1 answer
120 views

Are DB integration tests relevant to test DB schema (and worth being impl.) when being run in a CI pipeline? If not when are they?

This is something that is puzzling me a bit. I am seeing some people who like to implement DB-related integration tests (in the case of BLOBAs) to test the insertion with a Legacy DB in a CI pipeline, ...
Natalie Perret's user avatar
1 vote
2 answers
840 views

What is the correct way to unit test methods that mix dependencies and business logic?

I'm struggling to come to a consensus on the right approach that can be used somewhat consistently to balance integration and unit testing. Take the following method, that is extremely common to find ...
Stephen Vernyi's user avatar

1
2 3 4 5 6