Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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

share|improve this answer
    
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 2:43
    
Just created a test jenkins job for a multimodule project. Added -DfailNoTests=false -Dtest=<test class name> to its 'Goals and options' in a 'Build' section (i.e. my 'Goals and options' param looks like -DfailNoTests=false -Dtest=<test class name> install). As a result the whole project was built, only the specified test class was executed. – FlasH from Ru Jan 29 '14 at 7:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .