Data-Driven Testing

Data-driven tests can be made up of negative tests and positive tests, which determines whether the input data within or outside specified boundaries holds true. This way, you can test how the application handles various input without having a lot of similar tests that only have different data sets.

TestComplete helps eliminate the tedium and time that would otherwise be wasted testing input data manually for each required field in a database. Using TestComplete in this way will substantially increase the velocity of your database testing.

The data-driven testing approach can be used with unit and functional testing

Create Re-Usable Automated Tests

Instead of having pretty much identical automated tests that consist of the same operations but differ in input and expected values, you can use data-driven testing to separate test logic from test data by replacing hard-coded values in your automated tests with variables. This way, you can create re-usable automated tests that can run repeatedly with different data sets supplied by an external data source.

Data-Driven Testing with Various Data Sources

TestComplete supports Excel spreadsheets, CSV files and just about any database including Microsoft SQL Server, Oracle, MySQL, Microsoft Access, Interbase and others for data-driven testing. You can also implement data retrieval from custom sources, such as XML or INI files.

Get started with Data-Driven Testing and try TestComplete for free.

Parameterize Data-Driven Tests Easily

The built-in data-driver wizard scans your automated test for fixed values in operations and checkpoints and lets you quickly parameterize some or all of them using values from the selected data source.

Data-Driven Tests

Quickly Generate Test Data

TestComplete’s integrated data generator helps you quickly create large volumes of random yet realistic test data in a variety of formats. Using the data generator, you can create hundreds and thousands of test data sets in just a couple of minutes instead of hours of tedious work that it would take to create the data manually.

There are predefined generation rules for names, e-mail addresses, street addresses, cities, states, phone numbers, social security numbers (SSN), dates, number ranges, strings and so on. You can also generate data based on custom value lists and combine standard generation rules to produce sophisticated output. The generated data can be stored directly to test variables, or saved to Excel files that can be used by multiple tests.


data-generator-thumb-(1).jpg

Store All Values in One Place

With the data-driven testing approach, all input data and expected results for your automated tests are kept in one place, which makes it easier to maintain test cases. To change a test case, you just need to change the appropriate values in the data source file; there’s no need to modify the automated test itself.

Execute Expressions Specified Within the Storage’s Cells

During the data-driven testing, you can also execute expressions specified in cells of the processed storage (for example, your storage can contain the value of 5+5). To execute this expression, you can either use the Eval function (in VBScript and JScript) or the Evaluate function (in DelphiScript). To do that, you need to obtain the expression first and then pass it as a parameter of the Eval or Evaluate function.

After you run your test, it will automatically retrieve the needed expression from the data storage, execute it and return its result (in the example described above, the test will return 10).

Add New Data-Driven Test Cases Quickly

Data-driven testing makes adding new test cases as easy as adding a new entry into the data source.

Data-Driven Testing Increases Test Coverage

By driving your automated tests with a lot of different data sets that cover various aspects of your application’s features, you can increase your automated test coverage.

Get started with Data-Driven Testing and try TestComplete for free.