tags:

views:

63

answers:

2

Hi In my project, I have lot of test cases. What command can be used to selectively run one Test suite/test case? Please help

+1  A: 

try running:

mvn -Dtest=<test class> test

More information: http://maven.apache.org/plugins/maven-surefire-plugin/examples/single-test.html

digiarnie
Thanks.I tried this.But testcase is not getting executedI am just getting-[INFO] task-segment: [test][INFO] ------------------------------------------------------------------------[WARNING] Using platform encoding (MacRoman actually) to copy filtered resources, i.e. build is platform dependent![INFO] Nothing to compile - all classes are up to date[INFO] [compiler:testCompile {execution: compile}][INFO] Nothing to compile - all classes are up to date[[INFO] BUILD SUCCESSFULin pom - i have added the configuration for surefire plugin.Anything else to be done?
Would you be able to supply the pom file? do the tests run when doing a standard "mvn install"?
digiarnie
A: 

mvn test -Dtest=<test-case-name>

Krishnan