Maven run tests from commandline - CheatSheet

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


Popular posts from this blog

Trim / Remove spaces in Xpath?

RPA - Blue Prism, OpenSpan, Automation Anywhere vs UIPath