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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -