TestNG – Executing testng.xml using Maven

Last Updated:

Learn how to run testng.xml from maven in this testng maven example. Learn to integrate testng tests to run during build time to automate testng tests.

TestNG – Parallel Test Execution

Last Updated:

TestNG parallel execution of tests, classes and suites examples. Learn how to run testng tests and suites in parallel or single test in multiple threads.

TestNG – @Factory vs @DataProvider

Last Updated:

While learning TestNG, many people get confused when they read about the @DataProvider and @Factory annotations – when to use which annotation? and which is …

TestNG @Factory

Last Updated:

Learn about the TestNG @Factory annotation that allows the tests to be created at runtime depending on provided datasets or conditions. 1. When to Use …

TestNG – Dependent Tests

Last Updated:

Test Dependency is a feature in TestNG that allows a test method to depend on a single or a group of test methods. This will …

TestNG – Test Groups

Last Updated:

The ability to group the related tests is one of the most important features of TestNG. Users can group multiple tests into a named group. …

TestNG @DataProvider

Last Updated:

An important feature provided by TestNG is the @DataProvider annotation that helps us to write repeated tests or data-driven tests. This essentially means that the …

TestNG @Parameters

Last Updated:

TestNG parameterization feature allows user to pass parameters to tests as arguments. This is supported by using the testng @Parameters annotation.

TestNG Test Timeouts

Last Updated:

While executing tests, there can be cases where certain tests get stuck or may take longer execution time than expected. In such scenarios, we may …

TestNG – Disable or Ignore Tests

Last Updated:

When executing TestNG tests, there may be some scenarios where you may have to disable a particular test or a test suite from getting executed. …

TestNG – Expected Exception

Last Updated:

With TestNG, while writing unit tests, there can be certain scenarios where we need to verify that an exception is being thrown by the program …

TestNG – Test LifeCycle

Last Updated:

TestNG before and after annotations. @BeforeSuite, @AfterSuite, @BeforeTest, @AfterTest, @BeforeGroups, @AfterGroups, @BeforeClass, @AfterClass, @BeforeMethod and @AfterMethod.

TestNG Annotations

Last Updated:

TestNG uses annotations to help developers to write the tests. The following is a table containing information about all the annotations provided by TestNG and …

Getting Started with TestNG

Last Updated:

TestNG, where NG stands for “next generation” is a test automation framework inspired by JUnit (in Java) and NUnit (in C#). TestNG can be used …

HowToDoInJava

A blog about Java and its related technologies, the best practices, algorithms, interview questions, scripting languages, and Python.