
About TestNG
TestNG is an open source testing framework for Java. It covers unit, functional and integration tests, and it was inspired by JUnit and NUnit.
What it does
TestNG runs your Java tests and reports the results. You mark test methods with annotations, then organize them into groups or into a testng.xml file. It supports setup and teardown methods that run before and after groups of tests, and it can run suites, classes and methods in parallel.
Key features
- Annotations for setup, teardown and test methods
- Test groups, with nested and excluded groups
- Data providers for running one test with many inputs
- Dependencies between test methods and classes
- Parallel runs of suites, classes and methods
Who it's for
Java developers and QA engineers who need more control than basic unit testing gives. Teams with large test suites often use TestNG for its grouping, dependency handling and parallel runs.
Pricing and good to know
TestNG is free and open source under the Apache 2.0 license. It works with build tools such as Maven and Gradle, and the project documentation covers command line runs and tests packaged in a test jar. The source is on GitHub.
Highlights
- Annotations mark setup, teardown and test methods
- Group tests and exclude groups from a run
- Data providers run one test with many inputs
- Dependencies between test methods and classes
- Parallel runs of suites, classes and methods












