In this chapter, we learned how to build data-driven test classes using the TestNG annotations. This allowed users to tag Java methods as tests, setup, and teardown methods to make them run.
We covered the test class structure, naming conventions, use of the JSON DataProvider to pass in data to page object class methods, exception handling, and using suite XML files. Attributes for @Test annotations such asĀ groups, enable, dependsOnMethods, and so on were also covered.
In the next chapter, we will complete the use of encapsulated data in data-driven testing, property files, storing exception and confirmation messages, parallel testing, and processing data passed in as system properties.