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?
Asked
Active
Viewed 1.6k times
1 Answers
3
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
FlasH from Ru
- 203
- 2
- 8
-
It is not working in jenkins, In project level all test cases are running, in module level no test cases are running – Subbarao Gaddam Jan 29 '14 at 02:43
-
Just created a test jenkins job for a multimodule project. Added `-DfailNoTests=false -Dtest=
` to its 'Goals and options' in a 'Build' section (i.e. my 'Goals and options' param looks like `-DfailNoTests=false -Dtest= – FlasH from Ru Jan 29 '14 at 07:08install`). As a result the whole project was built, only the specified test class was executed.