Skip to content

Datasets

Datasets allow you to populate your test scripts with test data dynamically during run time. You can create multiple datasets for the same test case, allowing you to reuse the test script and test different sets of input values.

TIP

Datasets vs. Environments

Datasets are suitable for data that is specific to test scenarios. If you want to define variables and secrets that are specific to deployment environments, it is highly recommended to use Environments instead.

Using Datasets

In the Test Case Editor, scroll to the Test Script section.

👉 You can declare properties for a dataset in the test script in two ways:

  • using placeholder strings in angle brackets (e.g., <username>)
  • as properties of the DATA object (e.g., DATA.password)

For example, in this test script.

javascript
I.goTo("https://github.com/login")
// Navigate to the Github login page
I.fill("Username or email address", "<username>")
// Fill in the Username or email address field
I.fill("Password", DATA.password)
// Fill in the Password field
I.click("Sign in")

...will result in two dataset entries:

  • username
  • password

👉 TAMI Studio automatically detects dynamic values in your test script and creates dataset entries for them. You can set the values and mark them as secrets, in the Dataset section to the right of the Test Script.

Dataset Editro

👉 When you run a test, your test script will be populated with values from the current dataset selected.

INFO

TAMI Studio automatically saves the dataset when it is used to run a test. If the test case does not have a default dataset, the current dataset will be saved as the default.

Secrets

You can mark a property in a dataset as secret to mask the value in test reports.

👉 Click the eye icon to mark a property as a secret.

Mark variable as a secret in a dataset

Datasets in Preconditions

TAMI Studio allows you to use a test case as a precondition to another test case. Each precondition can have its own dataset.

Datasets from preconditions are propagated to all subsequent preconditions and to the main test case.

This means that variables and secrets defined in earlier preconditions are available in later steps, including the main test case.

If a variable is redefined in a later precondition or the main test case, the new value will overwrite the previous one.

➡️ Learn more about Preconditions.

Test Case Scoped vs Project Scoped Datasets

By default, datasets are saved as test-cased scoped datasets. You can save them as a project-scoped dataset.

Test-case scoped datasets can only be used to run with the test case that they are associated with.

Project-scoped datasets can be used to run with any test case. This is useful for data that is shared across multiple test cases. We recommend using Environments instead for environment-specific global variables and secrets such as base urls and api keys.