Back to Course
TestNG & Maven

Run Programs From TestNG

Ways to Run TestNG Tests

  • From Eclipse: right-click a test class or the testng.xml file and choose "Run As > TestNG Test/Suite."
  • From Maven: run mvn test, which executes the TestNG suite configured in pom.xml.
  • From the command line: run the TestNG jar directly against a compiled test suite.

Why Multiple Options Matter

Running from Eclipse is convenient during development; running via Maven is what makes the same suite runnable inside a CI/CD pipeline like Jenkins.

Ready to master real-world software testing?

Learn manual and automation testing hands-on with mentor-led sessions.

Explore Course