Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

maven test class

# Run all the unit test classes.
$ mvn test

# Run a single test class.
$ mvn -Dtest=TestApp1 test

# Run multiple test classes.
$ mvn -Dtest=TestApp1,TestApp2 test

# Run a single test method from a test class.
$ mvn -Dtest=TestApp1#methodname test

# Run all test methods that match pattern 'testHello*' from a test class.
$ mvn -Dtest=TestApp1#testHello* test

# Run all test methods match pattern 'testHello*' and 'testMagic*' from a test class.
$ mvn -Dtest=TestApp1#testHello*+testMagic* test
Source by mkyong.com #
 
PREVIOUS NEXT
Tagged: #maven #test #class
ADD COMMENT
Topic
Name
5+9 =