
Explore TestNG, a next-generation testing framework for Java, and learn why developers and testers use it to automate unit, UI, API, and mobile testing.
Install TestNG and use it in projects with practical steps for beginners, focusing on setup and integration in real-world development.
Auto generate a Java class with a TestNG @Test method in Eclipse IDE, using a Maven project and TestNG plugin, then run and verify the test results.
Explore how to use the priority attribute in TestNG to control test execution order beyond the default ASCII order, including handling of zero, negative, and duplicate priorities.
Explain hard vs soft assertions in TestNG with Selenium, showing how to verify title, URL, and search results, and use soft assertions to continue tests and assert all at end.
Explore TestNG annotations in part 10 of the TestNG for beginners course, reinforcing foundational concepts of TestNG annotation usage.
Learn how to use optional parameters in TestNG to pass values from the TestNG XML file, with @Optional as a fallback when values are missing, and XML values take precedence.
Enable or disable test cases in TestNG using the enabled attribute in the testNG.xml file, and see how true, false, or omitted values affect execution.
Learn to group tests in TestNG using the groups attribute, applying categories like smoke, sanity, and regression, and control execution with run tags in testng.xml at suit or test level.
Explore how TestNG's alwaysRun attribute ensures dependent tests execute even when the main test fails, with examples of login and wishlist tests and the depends-on methods concept.
Move the data provider method to a separate class and use dataProviderClass to supply test data to tests in another class.
Explore why using a two-dimensional object class array to return data from data provider methods enables parameterized tests in TestNG, handling multiple data sets of different types.
Learn the four return types for TestNG data providers: two-dimensional object array, single-dimensional object array, iterator of object, and iterator of object array, with practical data demonstrations.
Discover jagged arrays and how TestNG data providers feed tests with data sets of varying lengths, demonstrated with three data sets.
Learn how to partially pass data from a data provider in TestNG using the indices attribute to select specific data sets for testing and debugging failing cases.
Read data from Excel files into a TestNG DataProvider method using the POI API, enabling data-driven tests with Excel spreadsheets.
Discover how to execute data-driven tests in TestNG in parallel by using the parallel attribute in the data provider annotation, comparing true and false, and exploring practical examples with Selenium.
Learn how to use the expected exceptions attribute with the TestNG annotation for negative testing, while understanding why it's rarely used in real-time test automation, yet relevant for interviews.
Learn to execute tests in parallel with TestNG by configuring parallel modes and thread-count attributes, enabling faster test runs while understanding practical setup and considerations.
Learn to use parallel is equal to classes in testng to run multiple classes in parallel, and configure thread counts at test or suit level.
Demonstrates how setting parallel=false in a TestNG XML file disables parallel execution, forcing tests to run sequentially on a single thread, even when a thread count is provided.
Explore how parallel execution in testng behaves when thread count exceeds the number of tests, and learn that only the needed threads run tests while the remaining threads stay idle.
Learn how parallel equals classes or methods at the suit level in TestNG XML, and how this affects parallel class execution across tests.
discover the default thread-count in TestNG when parallel is specified without a thread-count attribute, which is five, demonstrated with 15 test methods running on five threads at the method level.
Learn how to use the ITestListener interface in TestNG, implement default methods, override onTestStart, onTestSuccess, onTestFailure, and connect the listener to tests to monitor test execution.
Differentiate listeners and annotations in TestNG. Annotations drive test flow around methods, suites, and groups, while listeners react to events such as start and failure, enabling actions like screenshots.
Explore the test listener adapter in TestNG and learn why replacing ITestListener with TestListenerAdapter can expose more overridable methods, using extends rather than implements for broader listener support.
Learn to retrieve the test tag name with the test method name in TestNG by using result.getTestContext().getName and concatenating with the test method name for logs and screenshot naming.
This course covers TestNG in-depth by covering all its concepts and topics, along with practical demonstration.
TestNG is explained from scratch and in a step by step manner.
TestNG is the backbone for building Selenium Test Automation Frameworks, hence it is required to learn in depth and detail.
This course ends your search for finding a course, which covers in and out about TestNG.
The following are the different TestNG topics which are covered in this course:
What is TestNG
Installing TestNG and using in Projects
Auto-generating TestNG Classes with a Test Method in Eclipse IDE
Using TestNG Testing Framework for Selenium Automation
Using TestNG Testing Framework with Rest Assured Framework for Automating API Tests
Using priority attribute
Using testng xml file for batch execution
Assertions in TestNG
Hard Assertions versus Soft Assertions
TestNG Annotations
Parameters in TestNG
Optional Parameters in TestNG
Enable Disable Test Cases using enabled attribute in testng xml file
Enable Disable Test Methods using enabled attribute and @Ignore annotation
Enable Disable Test Methods at Classs level using @Ignore annotation
Enable Disable Test Methods at Package level using @Ignore annotation
Grouping Tests in TestNG using multiple testng xml files
Grouping Tests in TestNG using groups attribute
Meta Groups in TestNG
Partial Groups in TestNG
Sub Category Groups in TestNG and using regular expressions
Test Dependency in TestNG using dependsOnMethods attribute
alwaysRun attribute
ignoreMissingDependencies attribute
dependsOnGroups attribute
Groups Depending on Groups using dependencies tag and depends-on attribute
Executing Tests at Package Level
TestNG Parameterization - Data Driven Testing, DataProvider annotation and dataProvider attribute
Naming DataProvider method using name attribute
Parameterizing Test method with Array parameter
Separating DataProvider method into a separate Class using dataProviderClass attribute
Multiple DataProvider methods
Multiple DataProvider methods in multiple classes
Why we have to use Object array to return data
Different return types of DataProvider
Jagged Arrays and DataProviders
Partially passing the data from Data Provider method using indices attribute
Reading Data from Excel files using POI API
Reading Data from Excel files into DataProvider method using POI API
Executing tests in parallel by specifying parallel attribute in DataProvider method
Controlling parallel tests thread count invoked by DataProvider using data-provider-thread-count
timeOut attribute
expectedExceptions attribute
Parallel Execution of Tests in TestNG using parallel and thread-count attributes
parallel=tests in TestNG Parallel execution
parallel=tests can only be mentioned at suite tag level and not at test tag level
parallel=classes in TestNG Parallel Execution
parallel=methods in TestNG Parallel Execution
Multiple test tags, but only few test tags enabled for parallel execution
parallel=none in TestNG Parallel Execution
parallel=false in TestNG Parallel Execution
parallel=tests but thread-count=1
Can we provide thread-count as negative value for Parallel Execution
More threads and less number of tests
parallel=classes or parallel=methods specified at suite tag level
Default thread-count when parallel attribute is only mentioned
invocationCount attribute
invocationTimeOut attribut
threadPoolSize attribute
What are Listeners
List of different Listeners available in TestNG Library
Using ITestListner Listener
Implementing Listeners at Class Level @Listeners annotation
Implementing Listeners at Suite Level in testng xml fil
onStart() and onFinish() ITestListener methods
Difference between listeners and annotations
Using TestListnerAdapter class in place of ITestListener interface
Taking screenshots for Failed Tests using Listeners
Avoiding Screenshot Overriding
Retrieving Test Tag name along with Test Name
Taking screenshots for Failed Tests using Dependency Injection
Default TestNG Reports and their real time usage
Uninstalling TestNG from Eclipse ID
TestNG verbose attribute - testng xml file TestNG Retry using IRetryAnalyzer and IAnnotationTransformer
TestNG verbose attribute - testng xml file