|
Answer» TestNG is a testing framework that is developed as inspiration from the most popular JUnit framework used for java programming language. TestNG framework is introduced to OVERCOME the limitations of the JUnit framework. Most of the organizations are using the TestNG framework because of its advantages and additional supporting FEATURES. Features of TestNG framework: TestNG supports more productive and advanced features and it is easy to use. Let’s check which new features are available in the TestNG framework. - It supports for parameters
- It supports testing of dependent methods
- Configuring the test is flexible
- It supports more powerful execution model
- It embeds BeanShell which further makes it more flexible.
- It is having more elegant WAYS of handling parameterized tests with data provider concept.
- It supports multiple instances for the same test class
- It becomes more extendible as different tools and plug-ins like Eclipse, Maven, IDEA is supported.
- TestNG framework allows generating reports in XML and HTML format.
- TestNG is designed to cover unit testing, integration testing, functional testing and end to end testing.
Advantage of TestNG v/s JUnit - TestNG have annotations that are easy to understand over JUnit
- In TestNG, it doesn’t require constraints like to declare @BeforeClass and @AfterClass, which needs to be DONE in JUnit
- TestNG allows executing test cases in a group, which is not possible in JUnit.
- TestNG support three additional setup: @Before/AfterSuite, @Before/AfterTest and Before/AfterGroup
- TestNG do not require to extend any extend
- TestNG allows us to define dependent test cases, each test CASE is independent of others.
- Parallel test case execution is possible in TestNG.
|