Maven run tests from commandline - CheatSheet
Purpose | Command |
---|---|
Run all tests | mvn test |
Run using testng verify | mvn verify |
Run the allure reports | mvn site |
Run a single maven test within a class | mvn -Dtest=TestObjects#ostiariusAddUserWithCancel test |
where "TestObjects" is the test class name and "ostiariusAddUserWithCancel" is the test method. | |
Run all tests within a group | mvn test -Dgroups=slow test |
Run all tests within a class | mvn -Dtest=com.amedia.qa.automation.testcases.testgoogle.TestGoogle test |
mvn clean test -Dtest=xxxxTest | |
Only runs all the test classes ending in PerformanceTest. | mvn -Dtest=*PerformanceTest clean test |
To run test suite xml file | mvn test -DsuiteXmlFile=src/test/resources/testsuite/test.xml |
Further Reading: http://maven.apache.org/surefire/maven-surefire-plugin/examples/single-test.html
Comments
Post a Comment