Reputation: 19699
How could I easily run only a smoke set of JUnit Selenium tests in Jenkins? Ant is used to execute tests, but I haven't found a way to annotate tests in JUnit and Java. In .NET and C# tests can be annotated, and easily grouped and categorized. I could of course set the Ant target to execute a Java package called "SmokeTests" and have the smoke tests there, but then the smoke tests would reside in two places (duplicate): smoke package and their original package where they belong to.
Any help appreciated!
Upvotes: 1
Views: 1518
Reputation: 6935
In the last versions of JUnit, there is a way to annotate tests.
They call it categories: https://github.com/junit-team/junit/wiki/Categories
You should be able to create a "smoke" category and launch only this one from Jenkins.
Upvotes: 3