It is a class-level annotation, used to determine how to load and configure an AppplicationContext. Actually, it creates a customed application context for this specific integration test. It loads @Configuration and @Component for a specific integration test.
@ActiveProfiles
It is a class-level annotation that is used to declare which bean definition profiles should be activated when loading an ApplicationContext for an integration test.
Activating a @Profile for this integration test.
@TestPropertySource
It is a class-level annotation, used to configure the location of properties files for an ApplicationContext loaded for an integration test.
Loading a specific property file for this integration test.
@Sql
It is used to annotate a test class or a test method to configure SQL scripts to run against a given database during integration tests.
By default, the SQL script is carried before the test method; but it can be configured by @Sql parameter.
No comments:
Post a Comment