Create Test Cases Just Once with Data Driven Testing

Data-driven testing (DDT) is taking a test, parameterizing it and then running that test with varying data. This allows you to run the same test case with many varying inputs, therefore increasing coverage from a single test. In addition to increasing test coverage, data driven testing allows the ability to build both positive and negative test cases into a single test. Data-driven testing allows you to test the form with a different set of input values to be sure that the application works as expected.

Also, Data-driven testing is a creation of test scripts where test data and/or output values are read from data files instead of using the same hard-coded values each time the test runs. This way, testers can test how the application handles various inputs effectively. During data-driven testing inputs to the system are read from data files such as Excel, ODBC, an XML file, a MySQL database etc.

Data Driven with Test Complete

Data-driven testing with TestComplete means using a single test to verify many different test cases by driving the test with input and expected values from an external data source instead of using the same hard-coded values each time the test runs. This way, you can test how the application handles various inputs without having a lot of similar tests that only have different data sets.

TestComplete provides you with all of data driven testing’s advantages:

  • Create Re-Usable Automated Tests
  • Data-Driven Testing with Various Data Sources
  • Parameterize Data-Driven Tests Easily
  • Quickly Generate Test Data
  • Store All Values in One Place
  • Data-Driven Testing Increases Test Coverage

Data-Driven testing framework:

It is an automation framework where test input and/or output values are read from data files. The different data files may include datapools, ODBC sources, csv files, Excel files, ADO objects, etc. The data is then loaded into variables in recorded or manually coded scripts.

Advantages of the Data-Driven test automation framework are as under:

  • Create scripts even when development of application is going on.
  • Redundancy & unnecessary duplication of creation of automated testing scripts gets greatly reduced due to the modular type of design & due to the use of files or records for both input as well as verifying the data.
  • Any change in functionality, just revise the particular ‘Business Function’ script.
  • Information like data inputs or outputs, expected results get stored in the form of conveniently managed text records.
  • This testing allows better error handling; thereby the resulting test scripts are more robust. This is due to the fact that when a script is called, the functions return ‘TRUE’ or ‘FALSE’ values, instead of aborting.

Disadvantages of the Data-Driven test automation framework are as under:

  • This kind of testing calls for great expertise of scripting language required by the automation tool.
  • For every test case we need many data-files. According to the number of screens being accessed we may have many data-inputs and may require much verification. Hence the test case needs to keep the data-files in different directories.
  • Text editor like Notepad is required to create and maintain data files. To maintain these, extra care is essential to have the desired format needed by the functions or scripts which would process the concerned files; otherwise this will lead to script-processing errors due to incorrect data-file format or its content.

In Data-driven testing, it is the data that drives the test, henceforth; it is called data-driven testing. Data-driven testing can save time and money for a development team because testing each piece of data manually is not required, rather with the help of testing software, such as TestComplete, you can automate the testing process. You may also change the parameters of the test case to reuse the test case as many times as you like in other instances.