Data Driven Testing
Accelerate data driven test automation using Eggplant™
Today, most applications require a user to interact with an application by keying in something at some point. Knowing how the application will respond to various inputs is essential to delivering a reliable, stable and quality product to market. The problem is, with all of the possible things an individual may do, how do you find the time to test as many combinations as possible? The answer, Eggplant™ Functional Tester Data-Driven Testing.
Data-driven testing is built around the need to test how an application deals with a range of inputs. Rather than having manual testers enter endless combinations of data or building specific values into a script, the test pulls values from a data source, enters that data to the application and verifies that the application responds appropriately before repeating the test with another set of values.
The range of input that a user interface can accept can be enormous. As a software system expands, manually entering test data into the system becomes increasingly impractical. Imagine having to manually validate all of the operations on the simple calculator interface - even a data driven test will cover only a tiny fraction of all possible inputs.
An important use of data driven tests is ensuring that applications are tested for boundary conditions and invalid input. A data driven test can validate that your application responds appropriately when a number is entered that is outside of the expected range, or a string is entered in a date field, or a required field is left blank. Data driven tests are often part of model-based tests, which build up randomized tests using a wide set of input data.
A data-driven test alleviates the pains of testing with large sets of data by separating test input from the test itself. Subsequently, tests do not have to be modified for varying sets of data and can remain constant for the duration of the test cycle.
Eggplant's scripting language, SenseTalk, provides many features that facilitate the creation of data-driven tests. The following example retrieves test data directly from a text file, but you can also write scripts that call AppleScripts or shell commands to extract data from a database.