Be the first to like this
All software operates on data. High quality software needs to be thoroughly tested. This mandates to take the data into account and creates a need for easy and powerful solutions for data driven unit, functional and integration tests. Data driven tests are tests in which the test logic stays the same and the test data changes with each invocation of the test logic.
With TestNG implementing and executing data driven tests is easy as test data can be injected into test methods as method parameters. Unfortunately TestNG doesn't provide any standard for binding test data from external data sources, like XML, or CSV / Excel files, to the test method parameters. It rather leaves it up to each developer to implement her own solution for data binding. To minimize the effort this calls for the provision of a standardized solution.
This presentation shows how easy it is to implement data driven tests with TestNG. It then goes on to introduce the TestNG Data Binding framework. This framework fills the gap and provides a standardized solution for test data binding. It features an open, plug-in based architecture allowing for countless data formats to be bound to test method parameters. Currently it can bind data from CSV, Java .properties, text and XML files.