Data-driven testing: Difference between revisions

Content deleted Content added
Undid revision 386522135 by 164.100.28.2 (talk)
No edit summary
Line 1:
{{Context|date=October 2009}}
'''Data-driven testing''' (DDT) is a term used in the testing of [[computer]] [[software]] to describe testing done using a table of conditions directly as test inputs and verifiable outputs. 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.
'''Data-driven testing''' is a term used in the testing of [[computer]] [[software]] for the creation of re-usable test logic to reduce maintenance and improve test coverage. It is a methodology used in [[test automation]] where [[test script]]s are executed and verified based on the data values stored in one or more central data sources or [[database]]s. Anything that has a potential to change (also called "Variability" and includes such as environment, end points, test data and locations, etc), is separated out from the test logic (scripts) and moved into an 'external asset'. This can be a configuration or test dataset. More data can later be added or the configuration changed to reuse the same test logic and execute multiple data scenarios.
 
==Introduction==
In the testing of [[Computer software|software]] or [[Computer program|programs]], 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 SUT. The cost aspect makes DDT cheap for automation but expensive for manual testing. One could confuse DDT with Table-driven testing, which this article needs to separate more clearly in future.
 
==Methodology Overview==
* '''Data-driven testing''' is the creation of interacting test scripts to run together with their related data resultssets in a framework used for the methodology. In thisThe framework, variablesprovides arere-usable usedtest forlogic bothto inputreduce valuesmaintenance and outputimprove verificationtest values:coverage. navigation through the [[System Under Test|program]], reading of the data sources,Input and logging ofresult (test statuscriteria) anddata informationvalues arecan allbe codedstored in theone testor script.more Thecentral logicdata executedsources inor [[database]]s, the scriptactual isformat dictatedand byorganisation thecan databe valuesimplementation specific.
 
For an example of data driven framework,please refer to http://muralikrishnapb-testautomation.blogspot.com/2010/08/data-driven-framework.html
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 powerfull automated regression testing tool.
Navigation through the [[System Under Test|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 such as environment, end points, test data and 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.
For an example of data driven framework,please refer to http://muralikrishnapb-testautomation.blogspot.com/2010/08/data-driven-framework.html