Introduction
In the last chapter, data-driven test classes and methods were designed and built to demonstrate how to use TestNG annotations and parameters to design and build test, setup, and teardown methods. In this chapter, we will dive further into the topic of test data. From what we have learned, encapsulating data into central locations and breaking it out from the test methods and page object classes is an important standard to follow.
What we need to understand about test methods versus test data is this: test methods should be small engines that perform a task, can take any variation of data, and that can test positive, negative, boundary, and limits of a feature. There is always an input and a verifiable output to a test. If users follow this rule, then simple "keyword" templates can also be built on top of the framework that allow users to extend test coverage by adding "sets" of data to run through the engines.
So, when designing the test framework for a development environment...