Data Driven Tests

Run Tests with Different Data Points

One of the major advantages of test automation is to reduce the cost of testing for those tests that are either impossible or cumbersome to perform by manual testing. Data driven tests allow you to use a single script and create multiple tests out of this by accepting data from an external source – CSV file.

Data Driven Tests - MarathonITE

Create multiple tests from a single script

MarathonITE allows you to execute a test script with some parts(or all) of input and expected values from a CSV file. With this feature, you can broaden your test coverage.

With MarathonITE DDT feature, you can create reusable test scripts that perform the same operations, but with different inputs and expected values.

Refactoring a Test Script

Refactor a test script to a data driven test

You can convert a regular test script into a data driven test by using MarathonITE’s data driven test refactoring. Just select the refactoring from the menu and select the inputs and expected values from the test script that need to be provided externally.

If the CSV file contains a column named marathon_test_name, MarathonITE uses that to name the test case.

Perform a Loop with Data from a CSV file

MarathonITE provides a refactoring to convert some lines of code into a loop, taking the data from a CSV file.

One of the routine requirements for a test script is to create some records before the actual test is performed. The data loop is very useful for such cases. When a data loop refactoring is applied, the script is converted to pick the data from a CSV file. You can add more rows to the CSV file. For each of the rows, the enclosed operations are performed.

Use MarathonITE‘s inbuilt CSV editor to quickly create test data

MarathonITE includes a simple editor for editing CSV files. Use it to quickly enter data for various cases.

Close Menu