Configurations & variables

Learn how to create simple variables and variable groups in Kapptivate to reuse values like credentials and profiles across tests.

Hardcoding identifiers, passwords, or email addresses into each test makes scenarios brittle and hard to maintain. Variables let you store those values once and reuse them everywhere, so a single change updates every test that depends on it. Kapptivate organizes them in two ways: simple variables with one global value, and variable groups that hold different values per variant.

Variables live in a product space. The Configurations page lists them all in a table showing each variable's name, value, and Usage, the tests that currently reference it.

Simple variables

A simple variable belongs to a product space and holds a single value used everywhere it's referenced. Pick a variable type when you create it.

A fixed value (text, number, key) that doesn't change. Use it for things like a client ID or a public key.

Create a simple variable:

1
Open the creation form

Click Create variable.

2
Name it

Enter a name with no spaces or special characters.

3
Choose a type

Select Single value, Secret, or Choice.

4
Describe it

Add a description. Optional, but recommended so teammates know what the variable is for.

5
Set the value

Enter the value, or the list of values for a Choice variable, then click Create.

Variable groups and variants

A variable group bundles several variables under one entity and gives each one a different value per variant. Switching the variant swaps every value in the group at once.

This is ideal for distinct user profiles, separate environments (staging, production), or complex test datasets. For example, a User Profiles group with variants Alexandre, Marc, and Julie lets you run the same scenario as a different person without touching the test.

Create a variable group:

1
Open the group form

Click Create variable group.

2
Name the group

For example, User Profiles.

3
Define the variants

Add each variant: for user profiles that might be Alexandre, Marc, Julie. Mark one as the Default.

4
Add variables

Add the variables the group needs, such as email and password.

5
Set a value per variant

For each variable, fill in the value for every variant. For email: Alexandre → alexandre@mail.com, Marc → marc@mail.com.

Switching variants from the group's dropdown updates all of its values at once to reflect the selected profile.

Using variables in tests

Once your variables are set up, inject them straight into your test steps.

Inject a variable into a step:

1
Open the variable picker

While creating or editing a step (a Click action, a text entry, etc.), click the {} icon next to the target field.

2
Go to the Variables tab

The picker also offers values from previous steps and random generators; your configured variables live in the Variables tab. See Variables in tests for the full picker.

3
Pick the variable

Browse the tree (for example User Profiles > email) and select the variable to insert it into the step.

Switch variant while configuring the test

In the test editor's side panel, the Environment tab lists your variable groups. Use the dropdown to change the variant the test uses. Switch from Alexandre to Marc and the test runs with Marc's data.

Switch variant at run time

On the final Run confirmation screen, Kapptivate shows the variables the run will use. This is your last chance to change the variant from a dropdown, so you can run the same scenario with a completely different profile or dataset on the fly.

Search and manage

The Configurations page keeps every variable and group in one place.

  • Search: Find variables and groups by name
  • Usage tracking: See which tests depend on a variable before you change it
  • Duplicate: Clone a variable to create a similar one
  • Delete: Remove a variable or variable group

Last updated on