Data-Driven Testing With TestComplete
Data-driven testing 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 input without having a lot of similar tests that only have different data sets.
The data-driven testing approach can be used with unit, functional and load testing. It is especially useful in scenarios that are too cumbersome to execute with manual testing, for example, when an application needs to be quickly supplied a large amount of input values.
TestComplete supports data-driven testing and provides you with all of its advantages:
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.
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.
Add New Test Cases Easily 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.
For a step-by-step description of how to create a data-driven test with TestComplete, please read the “Introduction to Data-Driven Testing With TestComplete” technical paper.