TestNG Framework — Learn TestNG for Automation in just ₹1499

Trained by working IT professionals from leading companies

10 HOUR TESTNG SYLLABUS

Learn TestNG end-to-end: annotations and execution lifecycle, priorities and groups, DataProvider for data-driven tests, XML suite configuration, parallel execution and thread counts, built-in reports and logging, plus a real-world mini project. Suitable for Java automation testers and those integrating TestNG with Selenium.

Fee: ₹1499 Training Mode: Instructor-led live class Duration: 10 hours Next Batch: Loading...

What you will learn from this course?

  • Module 1: Introduction to TestNG (1 hour)
    • Goal: Understand what TestNG is and how it integrates with Selenium or standalone Java testing.
    • What is TestNG?
    • Difference between JUnit and TestNG
    • Why TestNG for automation testing
    • Installing TestNG in Eclipse / IntelliJ
    • Creating the first TestNG test
    • Executing tests and viewing reports
  • Module 2: TestNG Annotations (1 hour)
    • Goal: Learn the purpose and order of annotations.
    • Important annotations:
      • @BeforeSuite, @BeforeTest, @BeforeClass, @BeforeMethod
      • @Test
      • @AfterMethod, @AfterClass, @AfterTest, @AfterSuite
    • Execution order and lifecycle
    • Practical demo showing execution sequence
    • Skipping tests and using enabled=false
  • Module 3: Grouping and Prioritization (1 hour)
    • Goal: Organize and control test execution order.
    • Test priorities (priority attribute)
    • Test dependencies (dependsOnMethods, dependsOnGroups)
    • Grouping tests:
      • groups attribute
      • Running specific groups from XML
    • Disabling or excluding tests
    • Example project with multiple groups
  • Module 4: TestNG Assertions (1 hour)
    • Goal: Validate test results using assertions.
    • What are assertions?
    • Hard vs. Soft assertions
    • Common assertions:
      • assertEquals(), assertTrue(), assertFalse(), assertNotNull()
    • Using the SoftAssert class
    • Handling assertion failures gracefully
    • Real-world validation examples (e.g., title, text, element display)
  • Module 5: Parallel Test Execution (1 hour)
    • Introduction to Parallel Execution
    • Concept of parallel vs sequential test execution
    • Benefits of parallel testing in automation
    • Use cases: multi-browser, multi-environment testing
    • TestNG Parallel Configuration
    • Overview of testng.xml file
    • Using parallel attribute:
      • parallel="tests"
      • parallel="classes"
      • parallel="methods"
    • Example XML setup for parallel test runs
    • Practical Implementation
    • Writing multiple test classes to run in parallel
    • Demonstration of parallel execution through testng.xml
    • Concept of independent WebDriver instances for each thread
  • Module 6: DataProvider Annotation (1 hour)
    • Goal: Learn data-driven testing with TestNG.
    • What is @DataProvider?
    • Syntax and structure
    • Returning Object arrays
    • Passing multiple sets of data to one test
    • Combining @DataProvider with @Test
    • Example: login test with multiple credentials
  • Module 7: testng.xml Configuration (1 hour)
    • Goal: Manage and execute tests via XML configuration.
    • Purpose of testng.xml file
    • Defining suites, tests, and classes
    • Running specific test methods or packages
    • Including and excluding groups or methods
    • Setting parallel execution in XML
    • Example XML file explained line by line
  • Module 8: Parallel Execution & Thread Count (1 hour)
    • Goal: Run multiple tests simultaneously.
    • Why parallel testing is useful
    • Running tests/classes/methods in parallel
    • Configuring parallel and thread-count in XML
    • Thread-safe coding practices
    • Parallel browser testing (conceptual demo with Selenium)
  • Module 9: TestNG Reports & Logging (1 hour)
    • Goal: Generate and interpret test execution reports.
    • Default TestNG HTML and XML reports
    • Reading and analyzing results
    • Logging test execution steps using:
      • Reporter.log()
      • Console output
      • Customizing report messages
    • Taking screenshots on test failure (conceptual demo)
  • Module 10: Real-World Project & Best Practices (1 hour)
    • Goal: Apply everything learned in a mini automation project.
    • Create a complete TestNG suite:
      • Multiple test classes
      • Data-driven tests
      • Parameterization and grouping
      • Assertions and reports
    • Organize test packages
    • Naming conventions and structure
    • Common TestNG interview questions & practical tips
TALK TO US FOR FREE