Working with TestNG - Starters Guide
Chapters
What is TestNG?
What is TestNG?
Standard Definition: TestNG is a testing framework inspired from NUnit and JUnit but introducing some new functionality that make it more powerful and easier to use.
TestNG testing framework is derived from JUnit and NUnit but it is not an extension of JUnit and it is an open source. TestNG is more powerful than JUnit and is designed to test integrated classes. It overcomes the limitations of JUnit and "NG" stands for "Next Generation". It borrows Annotations from Java introduced with JDK 5.0 to define tests.
TestNG advantages over JUnit
There are advantages of TestNG:
- Annotations made testers life easy
- Test cases can be grouped and prioritized more easily
- Generates logs
- Data parameterization
- Parallel testing is possible
Features of TestNG:
- TestNG has more annotations compare to JUnit like Before Suite, After Suite, Before Groups , After Groups, @priority
- TestNG supports Dependent test methods, load testing, parallel testing and partial failure
- TestNG supports simple annotations.
- TestNG supports integrated classes testing there is no need to create a new class instance every test method.
- TestNG has inbuilt html reporting
- TestNG supports multi-threading parallel execution
- TestingNG can be executed from command line
- TestNG has flexible runtime configuration.
- TestNG is very flexible for plug-in API.
Here is where TestNG sits
Description
This tutorial is focused on getting you started on TestNG, the testing framework inspired from JUnit and NUnit. Here is a quick table of contents
- What is TestNG?
- Environment Set-up
- Writing Tests
- Basic Annotations
- Execution Procedure
- Executing Tests
- Suite Test
- Ignore Test
- Group Test
- Exception Test
- Dependency Test
- Parametrized Test
- JUnit Tests
- Test Reports
- Running tests without Eclipse
- Plugin with ANT
Environment
A computer capable of running Java. IntelliJ Community IDE is also required for this course.
Prerequisites
Good knowledge of Java programming language and eclipse is essential.
Audience
Students looking to get started with TestNG
Learning Objectives
This tutorial will get you started with TestNG.
Author: Subject Coach
Added on: 12th Mar 2015
You must be logged in as Student to ask a Question.
None just yet!