Data Driven Test


Often there might be may be a number of data sets that have to be used to test a feature of in your application. Now running the same test with different data manually is time-consuming

Data-driven allows testing your application with different inputs and validation values used within a test case to quickly and easily ensure that your application performs as expected with a range of data.

CloudQA provides user to test data in two different approaches

1. Using CSV file

2. Using random variable


1. Using CSV file

CloudQA has a built-in option for data-driven testing that allows you to upload a CSV spreadsheet file using

a. Variable approach: When you want to run different sets of data for only selected input fields in your test case, variable approach is used.

b. Input Fields approach: If you want to test entire test case with data sets, input Fields can be used.

a. Variable approach:

For example, if a user wants to test email ID field and last name field with different sets of user-defined data in a test case, then variable approach can be used.

Below is the procedure create and execute data driven test using variables

  • Navigate to edit steps of test case and select the input field(s)

  • Name the input fields __variable name__(double-undersore variable name double-undersore) as shown below

    Local Image

  • Click on Custom Execute of a test case in actions column

  • Select the checkbox "Use a CSV file for Data Driven testing"

  • Select As variables radio button

  • Upload the CSV file with header as variable name given in the test case and followed by rows of data.

    Local Image

  • Click on execute

b. Input Fields approach:

If you want to test entire test case, for example "create customer" test case, all the input fields has to be tested with different data sets, Input fields can be used.

Below is the procedure create and execute data driven test using input field

  • Click on Custom Execute of a test case in actions column

  • Select the checkbox "Use a CSV file for Data Driven testing"

  • Select As input fields radio button

  • Download file template, provide data and save the file on disk.

  • Choose the file with data

  • Execute the Data Driven Test


2. Using Random variable

You can reuse a test case with different values by using Random Variables.

Use case

A test case with the creation of a user always requires new sets of data, to re-execute the test case. Instead of changing values every time in edit test case or changing in the application, you can use random variables.

How does it work?

  • Go to Edit Steps of a test case, Navigate to the step type in the test case
  • Clear the value and type "__"(Double underscore) and auto suggest will show up all random options
  • Pick the random option based on requirement and save the test case

Local Image

results matching ""

    No results matching ""