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?
Asked
Active
Viewed 324 times
1

unknown_boundaries
- 1,482
- 3
- 25
- 47
2 Answers
3
In JUnit4 you can use Categories and execute all Tests of 1..n Categories with the maven-surefire-plugin (see Using JUnit Categories).

Matthias
- 313
- 1
- 8
-
I went with enclosed option with parameterized. – unknown_boundaries Aug 30 '19 at 00:46
0
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.

Ori Marko
- 56,308
- 23
- 131
- 233