Maven run tests from commandline - CheatSheet





PurposeCommand
Run all tests mvn test
Run using testng verifymvn 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 groupmvn test -Dgroups=slow test
Run all tests within a classmvn -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 filemvn test -DsuiteXmlFile=src/test/resources/testsuite/test.xml

Further Reading: http://maven.apache.org/surefire/maven-surefire-plugin/examples/single-test.html

Comments

Popular posts from this blog

Website's underlying technology for automation

XPATH for IE / internet explorer

All time good software testing books!