Data-driven testing (DDT), also known as table-driven testing or parameterized testing, is a
software testing
Software testing is the act of examining the artifacts and the behavior of the software under test by validation and verification. Software testing can also provide an objective, independent view of the software to allow the business to apprecia ...
methodology that is used in the testing of
computer software
Software is a set of computer programs and associated software documentation, documentation and data (computing), data. This is in contrast to Computer hardware, hardware, from which the system is built and which actually performs the work.
...
to describe testing done using a table of conditions directly as test inputs and verifiable outputs as well as the process where test environment settings and control are not hard-coded. In the simplest form the tester supplies the inputs from a row in the table and expects the outputs which occur in the same row. The table typically contains values which correspond to boundary or partition input spaces. In the control methodology, test configuration is "read" from a database.
Introduction
In the testing of
software
Software is a set of computer programs and associated software documentation, documentation and data (computing), data. This is in contrast to Computer hardware, hardware, from which the system is built and which actually performs the work.
...
or
programs
Program, programme, programmer, or programming may refer to:
Business and management
* Program management, the process of managing several related projects
* Time management
* Program, a part of planning
Arts and entertainment Audio
* Programm ...
, several methodologies are available for implementing this testing. Each of these methods co-exist because they differ in the effort required to create and subsequently maintain. The advantage of Data-driven testing is the ease to add additional inputs to the table when new partitions are discovered or added to the product or
system under test System under test (SUT) refers to a system that is being tested for correct operation. According to ISTQB it is the test object.
From a Unit Testing perspective, the SUT represents all of the classes in a test that are not predefined pieces of c ...
. Also, in the data-driven testing process, the test environment settings and control are not hard-coded. The cost aspect makes DDT cheap for automation but expensive for manual testing.
Methodology overview
Data-driven testing is the creation of test scripts to run together with their related data sets in a framework. The framework provides re-usable test logic to reduce maintenance and improve test coverage. Input and result (test criteria) data values can be stored in one or more central data sources or
database
In computing, a database is an organized collection of data stored and accessed electronically. Small databases can be stored on a file system, while large databases are hosted on computer clusters or cloud storage. The design of databases spa ...
s, the actual format, organization and tools can be implementation specific.
The data comprises variables used for both input values and output verification values. In advanced (mature) automation environments data can be harvested from a running system using a purpose-built custom tool or sniffer, the DDT framework thus performs playback of harvested data producing a powerful automated regression testing tool.
Automated test suites contain user's interactions through the system's GUI, for repeatable testing. Each test begins with a copy of the "before" image reference database. The "user interactions" are replayed through the "new" GUI version and result in the "post test" database. The ''reference'' "post test" database is compared to the "post test" database, using a tool.
Differences reveal probable regression.
Navigation through the
program, reading of the data sources, and logging of test status and information are all coded in the test script.
Data driven
Anything that has a potential to change (also called "variability," and includes elements such as environment, end points, test data, locations, etc.) is separated out from the test logic (scripts) and moved into an 'external asset'. This can be a configuration or test dataset. The logic executed in the script is dictated by the data values.
Keyword-driven testing is similar except that the logic for the test case itself is encoded as data values in the form of a set of "action words", and not embedded or "hard-coded" in the test script. The script is simply a "driver" (or delivery mechanism) for the data that is held in the data source.
The databases used for data-driven testing can include:
*
Data pools
*
DAO
Dao, Dão or DAO may refer to:
* Tao (Chinese: "The Way" 道), a philosophical concept
* Dao (Chinese sword) (刀), a type of Chinese sword
* Dao (Naga sword), a weapon and a tool of Naga people
People and language
* Yao people, a minority ethnic ...
objects
*
ADO objects
See also
*
Control table
Control tables are tables that control the control flow or play a major part in program control. There are no rigid rules about the structure or content of a control table—its qualifying attribute is its ability to direct control flow in some wa ...
*
Keyword-driven testing
*
Test automation framework
*
Test-driven development
Test-driven development (TDD) is a software development process relying on software requirements being converted to test cases before software is fully developed, and tracking all software development by repeatedly testing the software against a ...
*
Metadata-driven testing
*
Modularity-driven testing
*
Model-based testing
Model-based testing is an application of model-based design for designing and optionally also executing artifacts to perform software testing or system testing. Models can be used to represent the desired behavior of a system under test (SUT), ...
References
* Carl Nagle: ''Test Automation Frameworks
Software Automation Framework Support on SourceForg
Data-driven testing approac
{refend
Software testing