TestNG is a testing framework focused on providing both unit and functional testing abilities in the Java programming language. It supports parallel testing, data providers, dependencies, groups and other features.
TestNG is a testing framework inspired from JUnit and NUnit, but introducing some new functionalities that make it more powerful and easier to use, such as:
- Annotation support.
- Run your tests in arbitrarily big thread pools with various policies available (all methods in their own thread, one thread per test class, etc).
- Test that your code is multi-thread safe.
- Flexible test configuration.
- Support for data-driven testing (with @DataProvider).
- Support for parameters.
- Powerful execution model (no more TestSuite).
- Supported by a variety of tools and plug-ins (Eclipse, IDEA, Maven, etc).
- Embeds BeanShell for further flexibility.
- Default JDK functions for run-time and logging (no dependencies).
- Dependent methods for application server testing.
- Detailed reports of executed tests.
- Distributed testing: allows distribution of tests on slave machines.
TestNG is designed to cover all categories of tests: unit, functional, end-to-end, integration, etc.
References: