All Questions
52
questions
0
votes
1
answer
51
views
GraphQLTestTemplate returning "Body is empty with status 401" for SpringBoot and GraphQL integration testing
I have been working on integration testing using SpringBoot + GraphQL following this tutorial: https://www.youtube.com/watch?v=bdfEjn6xZx0 which I found pretty straightforward.
However, when I execute ...
0
votes
0
answers
23
views
How can I disable REDIS for my Spring Boot integration tests? [duplicate]
I'm trying to disable REDIS in the context of my integration tests, but I'm not having success.
Whenever I run the integration tests, SpringBoot starts saving the test data inside REDIS, which causes ...
0
votes
1
answer
1k
views
Spring boot 3 Junit 5 Integration Test Error Creating bean with name error
I have verified that the CandidateRepository works correctly, by running unit tests for it. However, when I try to run the integration test for the CandidateController, I keep getting an error that ...
1
vote
1
answer
36
views
Spring Boot: pruning application context for integration testing
JUnit Jupiter 5.7.2 and Spring Boot 2.6.3 here. I have the following service class:
@Service
public class PasswordService implements PasswordEncoder {
private BCryptPasswordEncoder ...
0
votes
2
answers
64
views
Wiring real dependencies into Spring Boot integration test
Spring Boot integration testing here. I have the following service class:
@Service
public class PasswordService implements PasswordEncoder {
private BCryptPasswordEncoder passwordEncoder;
...
0
votes
0
answers
115
views
How to pause and resume Quartz scheduler in Spring integration test?
I'm testing Quartz application with @SpringBootTest. I need to initialize the database with test data before scheduler runs any job. Is it possible to pause and resume the Quartz scheduler in Spring ...
0
votes
2
answers
812
views
How to write a test for the Application class in Spring Boot for Kotlin
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.runApplication
@SpringBootApplication
class GetThingsDoneApplication
fun main(args: Array<...
0
votes
0
answers
212
views
Junit5 test containers with custom Spring annotation?
I have an idea that I'm not sure if it's feasible. I have multiple microservices that I'm trying to write integration tests for (in Junit5), most of them only need one test container (usually a ...
0
votes
1
answer
1k
views
@Autowired not working inside testcontainers
I am using test containers to make integration tests with the MSSQLServer image and when I am trying to inject my repository I am recieving the following error:
lateinit property modelRepository has ...
0
votes
0
answers
1k
views
How to Mock in Integration Tests - Junit
Im doing integration tests and one of my service is using firebase call to save the data. I want to mock the internal method call that uses the firebase call to indirectly mock the firebase.
public ...
1
vote
3
answers
2k
views
How to write Integration test for a microservice if it calling another microservice
I am writing an Integration Test(after here refer as IT)for my feature. In my requirement i need to call another service to update the data.these services cant be run locally so cant run Postman. SO ...
2
votes
1
answer
622
views
void method in Java Integration Tests
I have some experience with Unit Tests in Java and now started to write Integration Tests. However, I have some troubles understanding the Integration Test and writing test. Here are some issues that ...
1
vote
1
answer
2k
views
Testing conditions and exceptions in Integration Tests?
I have written several Unit Tests and now switched to write Integration Test in our Java (Spring Boot) app. We use JUnit and Mockito libraries for testing.
As far as I know, Integration Tests check ...
0
votes
1
answer
981
views
Junit test works only when renamed test class name
I am using junit4 to run test. My test class is as below in test->java->com.example->ProductIT.java
When I run mvn clean install on my project, below test is not recognized and not run.
...
2
votes
0
answers
435
views
Integration test not working with @Async and @Retryable
I am working on writing an integration test using JUNIT. Due to @Retryable been used in one of the methods called in the test, I am getting
org.springframework.retry.backoff....