Reputation: 1580
Consider different set of smoke tests to be run in test
and prod
environments. I've configured the build to hit respective profile to run smoke tests. This build provides the environment
as parameter. Is there a way to trigger correct Tests (for example ex: one out of SmokeTestEnvTests.java
and SmokeProdEnvTests.java
) using this environment system property?
Upvotes: 1
Views: 491
Reputation: 323
In JUnit4 you can use Categories and execute all Tests of 1..n Categories with the maven-surefire-plugin (see Using JUnit Categories).
Upvotes: 3
Reputation: 58774
Yoy should use different ActiveProfiles for different tests classes
annotation that is used to declare which active bean definition profiles should be used when loading an ApplicationContext for test classes.
Upvotes: 0