Basics Flashcards

1
Q

What are Integration Tests

A

An integration test is supposed to test whether different modules are bounded correctly and if they work as expected.
The application shall run in ApplicationContext and run tests in it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

@SpringBootTest

A

Spring boot provides @SpringBootTest annotation, which starts the embedded server, creates a web environment and then enables @Test methods to do integration testing. Use its webEnvironment attribute for it. It also creates the ApplicationContext used in the tests.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Separate profile

A

Ideally, we should keep the integration tests separated from the unit tests and should not run along with the unit tests. We can do this by using a different profile to only run the integration tests. A couple of reasons for doing this could be that the integration tests are time-consuming and might need an actual database to execute.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly