In Jenkins my job is of type “Build a maven2/3 project” and project name is “SeleniumProject” and project source is “SVN” contains around 40 test cases. When I build this, it runs all test cases and 3 of them fail. How can I execute an individual test in this project? These test cases are coming under module “automation”. Where do I need to configure build to run only one test case?
Answer
Use -Dtest=<test class name>
or -Dtest=<test class name>#<test method name>
as specified at http://maven.apache.org/surefire/maven-surefire-plugin/examples/single-test.html
ps: use StackOverflow for programming questions – they’ll get answered sooner
Attribution
Source : Link , Question Author : Subbarao Gaddam , Answer Author : FlasH from Ru