Introduction to TestNG
A series on Test Next Generation for complete beginner's
Table of contents
Created by Cedric Beust
TestNG is a Testing Framework inspired by JUnit and NUnit introducing more functionalities for easy use, grouping, prioritization etc.
It is also popular for organising tests in a structural format to enhance the maintainance and readability of the script.
Mostly used by Developers and Testers
It has :
- Annotations
- Running tests as per class, tests, suite, etc
- Supports Data-Driven Testing
- Supports Parallel Testing
- Supports Parameters
- Reporting for every failure or sucessful or skipped tests, etc.
Also covers different kinds of test categories such as : Unit Testing, Integration Testing, Functional Testing, etc.
Requirements
JDK 8 or higher
Execution in three simple steps :
- Writing business logic for our tests and inserting testNG annotations
- Adding information like - Class, Suite, Group etc to testng.xml
- Executing testng