Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
TestNG made easy for beginners (Detailed course)
Rating: 5.0 out of 5(1 rating)
20 students

TestNG made easy for beginners (Detailed course)

All concepts of TestNG are covered in a detailed and step by step manner
Created byArun Motoori
Last updated 1/2023
English
English [Auto],

What you'll learn

  • All the different topics of TestNG are covered in this course
  • All the Topics of TestNG are covered in a practical manner with examples
  • TestNG knowledge required for building TestNG Hybrid Automation Frameworks
  • TestNG is covered in a detailed, in-depth, easy and practical manner

Course content

1 section75 lectures18h 17m total length
  • 1. What is TestNG (TestNG - Part 1)14:42

    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.

  • 2. Installing TestNG and using in Projects (TestNG - Part 2)45:31

    Install TestNG and use it in projects with practical steps for beginners, focusing on setup and integration in real-world development.

  • 3. Auto-generating TestNG Classes with a Test Method in Eclipse IDE (TestNG - Pa5:00

    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.

  • 4. Using TestNG Testing Framework for Selenium Automation (TestNG - Part 4)40:10
  • 5. Using TestNG Testing Framework with Rest Assured Framework for Automating API43:42
  • 6. Using priority attribute (TestNG - Part 6)11:29

    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.

  • 7. Using testng xml file for batch execution (TestNG - Part 7)30:47
  • 8. Assertions in TestNG (Test8. Assertions in TestNG (TestNG - Part NG - Part 8)41:01
  • 9. Hard Assertions versus Soft Assertions (TestNG - Part 9)20:35

    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.

  • 10. TestNG Annotations (TestNG - Part 10)48:46

    Explore TestNG annotations in part 10 of the TestNG for beginners course, reinforcing foundational concepts of TestNG annotation usage.

  • 11. Parameters in TestNG (TestNG - Part 11)10:09
  • 12. Optional Parameters in TestNG (TestNG - Part 12)7:26

    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.

  • 13. Enable Disable Test Cases using enabled attribute in testng xml file (TestNG4:10

    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.

  • 14. Enable Disable Test Methods using enabled attribute and @Ignore annotation (4:13
  • 15. Enable Disable Test Methods at Classs level using @Ignore annotation (TestNG7:51
  • 16. Enable Disable Test Methods at Package level using @Ignore annotation (TestN9:44
  • 17. Grouping Tests in TestNG using multiple testng xml files (TestNG - Part 17)28:11
  • 18. Grouping Tests in TestNG using groups attribute (TestNG - Part 18)29:29

    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.

  • 19. Meta Groups in TestNG (TestNG - Part 19)7:31
  • 20. Partial Groups in TestNG (TestNG - Part 20)4:51
  • 21. Sub Category Groups in TestNG and using regular expressions (TestNG - Part 212:48
  • 22. Test Dependency in TestNG using dependsOnMethods attribute (TestNG - Part 2233:30
  • 23. alwaysRun attribute (TestNG - Part 23)5:54

    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.

  • 24. ignoreMissingDependencies attribute (TestNG - Part 24)7:42
  • 25. dependsOnGroups attribute (TestNG - Part 25)18:23
  • 26. Groups Depending on Groups using dependencies tag and depends-on attribute (11:07
  • 27. Executing Tests at Package Level (TestNG - Part 27)10:07
  • 28. TestNG Parameterization - Data Driven Testing, DataProvider annotation and d33:27
  • 29. Naming DataProvider method using name attribute (TestNG - Part 29)4:31
  • 30. Parameterizing Test method with Array parameter (TestNG - Part 30)8:07
  • 31. Separating DataProvider method into a separate Class using dataProviderClass6:30

    Move the data provider method to a separate class and use dataProviderClass to supply test data to tests in another class.

  • 32. Multiple DataProvider methods (TestNG - Part 32)11:23
  • 33. Multiple DataProvider methods in multiple classes (TestNG - Part 33)11:30
  • 34. Why we have to use Object array to return data (TestNG - Part 34)15:13

    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.

  • 35. Different return types of DataProvider (TestNG - Part 35)22:18

    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.

  • 36. Jagged Arrays and DataProviders (TestNG - Part 36)9:18

    Discover jagged arrays and how TestNG data providers feed tests with data sets of varying lengths, demonstrated with three data sets.

  • 37. Partially passing the data from Data Provider method using indices attribute8:08

    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.

  • 38. Reading Data from Excel files using POI API (TestNG - Part 38)46:16
  • 39. Reading Data from Excel files into DataProvider method using POI API (TestNG53:08

    Read data from Excel files into a TestNG DataProvider method using the POI API, enabling data-driven tests with Excel spreadsheets.

  • 40. Executing tests in parallel by specifying parallel attribute in DataProvider9:33

    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.

  • 41. Controlling parallel tests thread count invoked by DataProvider using data-p6:43
  • 42. timeOut attribute (TestNG - Part 42)9:09
  • 43. expectedExceptions attribute (TestNG - Part 43)7:08

    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.

  • 44. Parallel Execution of Tests in TestNG using parallel and thread-count attrib47:32

    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.

  • 45. parallel=tests in TestNG Parallel execution (TestNG - Part 45)12:51
  • 46. parallel=tests can only be mentioned at suite tag level and not at test tag4:32
  • 47. parallel=classes in TestNG Parallel Execution (TestNG - Part 47)11:47

    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.

  • 48. parallel=methods in TestNG Parallel Execution (TestNG - Part 48)9:12
  • 49. Multiple test tags, but only few test tags enabled for parallel execution (T8:50
  • 50. parallel=none in TestNG Parallel Execution (TestNG - Part 50)3:14
  • 51. parallel=false in TestNG Parallel Execution (TestNG - Part 51)4:25

    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.

  • 52. parallel=tests but thread-count=1 (TestNG - Part 52)4:38
  • 53. Can we provide thread-count as negative value for Parallel Execution (TestNG2:08
  • 54. More threads and less number of tests (TestNG - Part 54)3:58

    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.

  • 55. parallel=classes or parallel=methods specified at suite tag level (TestNG -7:01

    Learn how parallel equals classes or methods at the suit level in TestNG XML, and how this affects parallel class execution across tests.

  • 56. Default thread-count when parallel attribute is only mentioned (TestNG - Par4:03

    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.

  • 57. invocationCount attribute (TestNG - Part 57)9:34
  • 58. invocationTimeOut attribute (TestNG - Part 58)5:52
  • 59. threadPoolSize attribute (TestNG - Part 59)4:28
  • 60. What are Listeners (TestNG - Part 60)7:39
  • 61. List of different Listeners available in TestNG Library (TestNG - Part 61)4:33
  • 62. Using ITestListner Listener (TestNG - Part 62)15:45

    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.

  • 63. Implementing Listeners at Class Level @Listeners annotation (TestNG - Part 612:36
  • 64. Implementing Listeners at Suite Level in testng xml file (TestNG - Part 64)6:20
  • 65. onStart() and onFinish() ITestListener methods (TestNG - Part 65)6:54
  • 66. Difference between listeners and annotations (TestNG - Part 66)6:25

    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.

  • 67. Using TestListnerAdapter class in place of ITestListener interface (TestNG -9:01

    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.

  • 68. Taking screenshots for Failed Tests using Listeners (TestNG - Part 68)26:53
  • 69. Avoiding Screenshot Overriding (TestNG - Part 69)11:03
  • 70. Retrieving Test Tag name along with Test Name (TestNG - Part 70)6:38

    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.

  • 71. Taking screenshots for Failed Tests using Dependency Injection (TestNG - Par10:51
  • 72. Default TestNG Reports and their real time usage (TestNG - Part 72)16:02
  • 73. Uninstalling TestNG from Eclipse IDE (TestNG - Part 73)4:17
  • 74. TestNG Retry using IRetryAnalyzer and IAnnotationTransformer (TestNG - Part21:58
  • 75. TestNG verbose attribute - testng xml file (TestNG - Part 75)9:14

Requirements

  • Selenium Test Automation

Description

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:


  1. What is TestNG

  2. Installing TestNG and using in Projects

  3. Auto-generating TestNG Classes with a Test Method in Eclipse IDE

  4. Using TestNG Testing Framework for Selenium Automation

  5. Using TestNG Testing Framework with Rest Assured Framework for Automating API Tests

  6. Using priority attribute

  7. Using testng xml file for batch execution

  8. Assertions in TestNG

  9. Hard Assertions versus Soft Assertions

  10. TestNG Annotations

  11. Parameters in TestNG

  12. Optional Parameters in TestNG

  13. Enable Disable Test Cases using enabled attribute in testng xml file

  14. Enable Disable Test Methods using enabled attribute and @Ignore annotation

  15. Enable Disable Test Methods at Classs level using @Ignore annotation

  16. Enable Disable Test Methods at Package level using @Ignore annotation

  17. Grouping Tests in TestNG using multiple testng xml files

  18. Grouping Tests in TestNG using groups attribute

  19. Meta Groups in TestNG

  20. Partial Groups in TestNG

  21. Sub Category Groups in TestNG and using regular expressions

  22. Test Dependency in TestNG using dependsOnMethods attribute

  23. alwaysRun attribute

  24. ignoreMissingDependencies attribute

  25. dependsOnGroups attribute

  26. Groups Depending on Groups using dependencies tag and depends-on attribute

  27. Executing Tests at Package Level

  28. TestNG Parameterization - Data Driven Testing, DataProvider annotation and dataProvider attribute

  29. Naming DataProvider method using name attribute

  30. Parameterizing Test method with Array parameter

  31. Separating DataProvider method into a separate Class using dataProviderClass attribute

  32. Multiple DataProvider methods

  33. Multiple DataProvider methods in multiple classes

  34. Why we have to use Object array to return data

  35. Different return types of DataProvider

  36. Jagged Arrays and DataProviders

  37. Partially passing the data from Data Provider method using indices attribute

  38. Reading Data from Excel files using POI API

  39. Reading Data from Excel files into DataProvider method using POI API

  40. Executing tests in parallel by specifying parallel attribute in DataProvider method

  41. Controlling parallel tests thread count invoked by DataProvider using data-provider-thread-count

  42. timeOut attribute

  43. expectedExceptions attribute

  44. Parallel Execution of Tests in TestNG using parallel and thread-count attributes

  45. parallel=tests in TestNG Parallel execution

  46. parallel=tests can only be mentioned at suite tag level and not at test tag level

  47. parallel=classes in TestNG Parallel Execution

  48. parallel=methods in TestNG Parallel Execution

  49. Multiple test tags, but only few test tags enabled for parallel execution

  50. parallel=none in TestNG Parallel Execution

  51. parallel=false in TestNG Parallel Execution

  52. parallel=tests but thread-count=1

  53. Can we provide thread-count as negative value for Parallel Execution

  54. More threads and less number of tests

  55. parallel=classes or parallel=methods specified at suite tag level

  56. Default thread-count when parallel attribute is only mentioned

  57. invocationCount attribute

  58. invocationTimeOut attribut

  59. threadPoolSize attribute

  60. What are Listeners

  61. List of different Listeners available in TestNG Library

  62. Using ITestListner Listener

  63. Implementing Listeners at Class Level @Listeners annotation

  64. Implementing Listeners at Suite Level in testng xml fil

  65. onStart() and onFinish() ITestListener methods

  66. Difference between listeners and annotations

  67. Using TestListnerAdapter class in place of ITestListener interface

  68. Taking screenshots for Failed Tests using Listeners

  69. Avoiding Screenshot Overriding

  70. Retrieving Test Tag name along with Test Name

  71. Taking screenshots for Failed Tests using Dependency Injection

  72. Default TestNG Reports and their real time usage

  73. Uninstalling TestNG from Eclipse ID

  74. TestNG verbose attribute - testng xml file TestNG Retry using IRetryAnalyzer and IAnnotationTransformer

  75. TestNG verbose attribute - testng xml file


Who this course is for:

  • This course is for those who want to gain complete knowledge on TestNG for building Automation Frameworks