Skip to main content

All Questions

0 votes
2 answers
36 views

Compared to every other type of test, why are unit tests valued so highly? [closed]

I am struggling to understand why unit tests are valued so highly in the coding community. If I look at any other type of test (e.g. feature, integration, TIP), I think any of them carry infinitely ...
helloworld123's user avatar
-1 votes
2 answers
192 views

Are both integration test and unit test needed in all cases in Spring Boot? [closed]

I have a Spring Boot backend where i run integration tests for my controllers (endpoints) and unit tests for my service methods. For some endpoints there are just simple service calls that are ...
Cyrill22's user avatar
0 votes
0 answers
28 views

basic integration test in rust [duplicate]

Start learning rust, and got stuck when trying to test my code.... I think a scope problem.. !project structure . ├── Cargo.lock ├── Cargo.toml ├── src │   ├── main.rs │   ├── mymod │   │   ├── mod.rs ...
mvcorrea's user avatar
  • 101
0 votes
0 answers
58 views

Creating test objects for testing purposes without boilerplate code in spring boot

I am dealing with boilerplate code in my test cases. I use JUnit and Mockito as frameworks for my tests. I am building a rest API and when a create request for example performs from client I get this ...
user14800584's user avatar
0 votes
1 answer
187 views

Mocking child functions in unit testing

How do you mock standalone functions in Golang? Let me use an example to explain. Example (Written in Golang) Suppose you have some code like this: type Item struct { price int ...
Ryn's user avatar
  • 471
0 votes
2 answers
693 views

Tested method call does not hit the service in Spring Boot

I am trying to test a service method that uses MapStruct as shown below: @SpringBootTest(classes = {CategoryController.class, CategoryService.class, CategoryResponseMapperImpl.class}) class ...
Jack's user avatar
  • 1
0 votes
0 answers
80 views

How to identify which testing framework is being used

How to check whether in which testing framework, test cases are written I don't want to check it manually but through a script, and when i get to know that. I can run the specific command of the ...
Hashir Azam's user avatar
1 vote
0 answers
592 views

Cannot test WebClient exception situation

I use Spring WebClient and write a test by following this page. Everything is ok except from the exception test. I tried to use many different exception classes, but each time I get: java.lang....
Jack's user avatar
  • 1
0 votes
1 answer
693 views

react testing library ternary operator, finding right component

I'm beginner with React testing, learning by coding, here i have a component 'cam.tsx' i want to test it, when i want to test Add function it goes straight like this, but when i want to test Update ...
walee's user avatar
  • 605
0 votes
0 answers
206 views

What are methods to make Docker work faster when using it for tests?

My ultimate goal is to create a test environment where auxiliary services (microservices, databases, message queues, etc) could be easily provided in clean state for each test. Currently I achieved ...
Gill Bates's user avatar
  • 15.1k
2 votes
1 answer
1k views

How to test a function call inside another function? JEST

In case you're interested, I solved this already using the first solution provided. I was missing babel from jest, I was using the experimental es6+ settings found in jest documentation stating I ...
Nicolas's user avatar
  • 63
1 vote
1 answer
4k views

java.lang.NoClassDefFoundError: org/springframework/test/context/TestContextAnnotationUtils in SOAP web service test

I have generated SOAP web service in spring boot and the endpoint works fine. Then I added some test for that endpoint and I get the following error stack while running the test: 21:33:51.263 [main] ...
gunel's user avatar
  • 179
0 votes
0 answers
43 views

Is it bad practice to use production code in the Arrange phase of a test?

When writing tests in an Arrange-Act-Assert pattern, is it okay to use production code in the arrange phase to put the SUT in a certain state? Context I have created a service for handling backups of ...
Arvid Inge's user avatar
0 votes
1 answer
415 views

How to start testing a large project in Flutter?

I'm building a mobile app with flutter framework and dart language, now I'm in the testing phase and I learned all types of tests (unit test, incremental test, integration test), the problem is that ...
Amine Zeroual's user avatar
-1 votes
1 answer
584 views

Where do end-to-end or integration tests fit within a TDD worflow?

Everyone is familiar with the typical workflow of TDD: write a failing test, make the test pass by writing just enough code, refactor your code, and repeat. This is often captured with the coined &...
Antoine Viscardi's user avatar

15 30 50 per page
1
2 3 4 5
15