Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.

All Questions

Filter by
Sorted by
Tagged with
0 votes
2 answers
125 views

I am building an API project, where I have a controller called C1, which calls service S1. Within this service, there are multiple method invocations to services S2and S3 and S4, as well as a call to ...
Héctor Iglesias's user avatar
0 votes
1 answer
84 views

I've been working on an implementation of a service, and have found that there are a number of operations where I need to read from a database to provide a caller with certain data or objects. In-line ...
Lily Smith's user avatar
2 votes
3 answers
1k views

I'm programming a .NET WebApi application from services. What is the scope of an integration test within the following schema? Order creation scenario: Order is created -> stored in db -&...
Petr Klekner's user avatar
3 votes
3 answers
207 views

What are your opinions on writing "production" code to facilitate testing? Specifically, the use case is this: we have a system with a multiple step workflow, where a few stages are done by ...
Kramer's user avatar
  • 147
0 votes
5 answers
504 views

I work on an organization's internal .NET Core 8 application where various dates are stored in different canonical formats, and some comparisons (checking that the current moment falls between a data ...
Green Grasso Holm's user avatar
0 votes
2 answers
241 views

I have recently come across a few codebases at work where the previous developers chose to reach the >80% coverage criteria by writing only integration tests with the @SpringBootTest annotation ...
Mary's user avatar
  • 3
13 votes
10 answers
4k views

By QA testing I mean like say integration testing, system testing, regression testing, user acceptance testing and the like. If unit testing is skipped altogether would bugs that typically are spotted ...
Wes's user avatar
  • 335
3 votes
2 answers
233 views

Say I have a method that expects data to be in some form to perform accurately. In the actual service/application flow, that data is formed upstream in other methods or services. How can I ensure the ...
Jason's user avatar
  • 33
-1 votes
1 answer
220 views

Based on the documentation on Spring testing: https://docs.spring.io/spring-framework/reference/testing/testcontext-framework/tx.html#testcontext-tx-enabling-transactions Annotating a test method ...
Rui's user avatar
  • 1,935
18 votes
10 answers
8k views

I've read many posts about unit tests only testing one object/class and mocking of objects should only be for direct dependencies of the object under tests. The only other option discussed for ...
Thor's user avatar
  • 307
-1 votes
2 answers
162 views

I'm obviously having trouble creating a question that fits StackExchange guidelines in regard of opinions vs metrics. Any help to improve this question is highly appreciated. I'm searching for a ...
DarkTrick's user avatar
  • 286
1 vote
2 answers
154 views

Imagine following scenario: Our team is working on a mobile project in biometrics. The team delivers a client facing SDK. Our work relies on another internal team, that is delivering algorithms in a ...
user avatar
0 votes
1 answer
560 views

I have a service method, acceptOrDenyJoinRequest, which follows a fairly complex flow (as depicted in this diagram): In my unit tests, the implementation details of this method are heavily reflected. ...
Saimur Rahman's user avatar
1 vote
1 answer
603 views

I have a service method called acceptOrDenyJoinRequest that follows a logic similar to this flowchart (green boxes are ignored in code, and the light gray box calls an external service). According to ...
Saimur Rahman's user avatar
2 votes
5 answers
498 views

I was exploring TDD, specifically the Outside-In TDD pattern, where we need to write the acceptance (integration) test and then jump on to granular unit tests to implement the feature and make the ...
Jignesh M. Khatri's user avatar
0 votes
0 answers
106 views

I reproduced a small example of kerkour's Rust Clean Architecture on the Rust Playground. The code is just an example and the methods code makes no sense at all. This architecture leaks DB information ...
Fred Hors's user avatar
  • 139
0 votes
4 answers
335 views

Let's say that I've been iterating over my feature A with TDD. After several red-green-refactor cycles, I ended up with a nicely polished implementation with a part of the SUT encapsulated into some ...
Maciek Czarnik's user avatar
2 votes
1 answer
784 views

When discussing the testing approach, we had disagreements. We develop software that we package into an image and distribute. We have two suggestions for testing: Build a separate image with a test ...
Vladimir's user avatar
1 vote
2 answers
358 views

At work I am currently tasked to implement End2End/integration Tests for one application using Selenium. we have an project consisting of a frontend and multiple backends (spring-boot apis). The ...
KilledByCheese's user avatar
3 votes
3 answers
1k views

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
112 views

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
690 views

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
  • 503
1 vote
1 answer
106 views

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
6 votes
5 answers
8k views

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
-3 votes
2 answers
401 views

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 ...
Kaveh Shahbazian's user avatar
1 vote
2 answers
245 views

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
2k views

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
0 votes
1 answer
477 views

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 ...
Robin's user avatar
  • 103
9 votes
5 answers
4k views

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
835 views

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
109 views

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,541
1 vote
0 answers
131 views

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
225 views

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
3 votes
2 answers
430 views

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 ...
mleko's user avatar
  • 47
0 votes
0 answers
79 views

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
848 views

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
6 votes
1 answer
3k views

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

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
429 views

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,040
0 votes
3 answers
1k views

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
107 views

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
745 views

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
1k views

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
535 views

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
331 views

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
103 views

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
37 votes
3 answers
6k views

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's user avatar
  • 613
0 votes
1 answer
286 views

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

1
2 3 4 5
8