All Questions
221
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 ...
-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 ...
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
...
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 ...
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
...
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 ...
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 ...
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....
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 ...
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 ...
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 ...
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] ...
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 ...
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 ...
-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 &...