maven - Specify which Junit test to run -
i using selenium junit maven , jenkins, best way specify tests run? tried categories found complicated. there easy way specify test methods/class run?
although believe categories way go, alternatively include/exclude test classes in surefire plugin configuration.
<plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-surefire-plugin</artifactid> <version>2.18.1</version> <configuration> <includes> <include>sample.java</include> </includes> </configuration> </plugin>
if want execute single test method, can specify test
property
mvn -dtest=testcircle#mytest test
you set test
property in pom.xml , set differently in different profiles, in end, categories superior , test suite design practice.
Comments
Post a Comment