Create a data-driven functional test

In this tutorial, you will learn how to data-drive a test using a variety of realistic data to test the application with HCL OneTest UI data-driver wizard.

Data-driven testing puts a layer of abstraction between the data and the test script, eliminating literal values in the test script. Because data is separated from the test script, you can:

  • Modify test data without affecting the test script
  • Add new test cases by modifying the data, not the test script
  • Share the test data with many test scripts

A dataset is a collection of related data records. A dataset supplies data values to the variables in a test script during test script playback. Data-driven testing uses data from an external file, a dataset, as input to a test.

The diagram on the left shows a test script, which uses data with hard-coded, literal references in the test script. The diagram on the right shows a data-driven test script that uses data from an external file, a dataset.

Hard-coded test script Data-driven test script
Hard-coded test script Data-driven test script

About the sample application -- Classics CD

You will use the ClassicsCD sample application to create a project and record a test script to verify that the ClassicsCD sample application correctly totals an order placed in the application. You will also create a verification point with a dataset reference to check that the total amount of the order is correct in the Classics CD application.

Learning objectives

This tutorial is divided into several lessons that must be completed in sequence for the tutorial to work properly.

While completing the lessons, you will:

Note: Consider printing the tutorial before you begin and using the printed copy as you work through the lessons. You can print each lesson by right-clicking inside each topic and then clicking Print.

Time required

This tutorial should take approximately 30 minutes to finish. If you explore other concepts related to this tutorial, it could take longer to complete.

Advance to Lesson 1: Create a project and record a test script.