Skip to main content
Test Datasets

Define test datasets, parameters (variables) to be used with test cases at the time of their execution.

Vishal Vaswani avatar
Written by Vishal Vaswani
Updated over 3 weeks ago

Why test datasets?

Test datasets help:

  • test data driven test cases design

  • adding parameters (variables) to the test case steps and expected results

  • eliminate the need to re-write test cases for multiple variations

  • these test cases to re-run with different values of these parameters

  • recording different results for different iterations based on the parameter values

In short, it offers more reusability, flexibility and adaptability in testing procedures.

Managing test datasets

Note: Test datasets feature is available for companies on Elite and Enterprise plans.

Administrators and users with roles having required permissions can perform the following operations:

  • Introduce new test datasets that can be linked with test cases across the project

  • Edit a pre-existing test dataset

  • Delete a pre-existing test dataset

Managing test datasets from test datasets page

A test dataset can be added, edited or deleted from the Test Datasets page, accessible under Settings menu.

Adding a new test dataset

Use the Add Test Dataset button available on the Test Datasets page to open the add new test dataset form.

Test Dataset Name is mandatory, a name that identifies the purpose of dataset and is unique within a project should be provided.

Parameter Name also has to be unique within a dataset.

Once the parameters are added, the data values can be populated. Clicking on a cell of the table makes it editable. A Tab key (or Shift+Tab) can be used to navigate between the adjacent cells of the table.

Managing rows on test dataset table

Operations possible with rows

  • Insert - adds a new row just below the selected one

  • Duplicate - copies the content of selected row by adding a new row just below the selected one

  • Delete - deletes the selected row

If you have clicked on the header row then you get these options

  • Insert - adds a new row at the end of the table

  • Duplicate rows 1 to N - duplicates all data rows, here "N" is total number of data rows

  • Delete rows 1 to N - deletes all data rows, here "N" is total number of data rows

The + Add box just below the table can also be used to add one or more rows to the end of the table.

Editing a test dataset

A user with the necessary rights can make changes in name, parameters' names, data values while editing a test dataset.

Deleting a test dataset

It is important to note that a test dataset can only be deleted if it is not linked with any of the test cases. The user again must have permissions to perform this operation.

Managing datasets while adding to editing test cases

While adding or editing a test case, you can refer to the parameters that are required to be used with test case steps or expected results. The parameter names need to be enclosed within {{ and }} for instance, you want a parameter with the name "email" to be used for a step then you can write {{email}}. When you provide a parameter name like this, TestCollab search within all the parameters that are already present with pre-existing datasets. If it finds such datasets then it would suggest them just below the steps section on the page. Please note that a parameter name in capital case or small case or mixed case would be treated the same.

The dataset names will be followed by the names of parameters they have.

Two important options that are available for users to use test datasets, on test case add/edit pages, are:

  • Select

  • Use as template

Select

By using this option you select a previously defined dataset and link it with the test case. Please note that it will show all the parameters saved with the test dataset along with their data rows in the table, but only the parameters referred in steps or expected results will be considered while running test cases.

If your role in the project permits, then the following options can be performed with the selected dataset:

  • Change the existing values for parameters

  • Add new rows of data

  • Add new columns - by using additional parameter names within {{ and }} with the steps or expected results

When the test case is saved the changes made in the linked dataset will also be permanently saved.

Use as template

This option allows you to use the values for the parameters that have been added with steps or expected results. As the name suggests this option lets you use a pre-existing dataset as a template to create a new one, if your role in the project permits.

Remove a link between a test case and a test dataset

The Remove option available just above the dataset table can be used to unlink the association between test case and the selected test dataset.


Running a test case with linked test dataset

A test case with linked test dataset when added to a test plan, every row of the associated dataset creates a separate iteration. For every iteration the values for parameters referred in test case are shown on steps and expected results sections respectively.

When this test case is being executed, then for every iteration (separately), the tester can set its status , add comments and attach files.

Did this answer your question?