Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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 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 at 7:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.