Testim Documentation

Welcome to the Testim documentation. You'll find comprehensive guides to help you get started quickly, example code snippets, and tips for being more productive. You will also find details about advanced features that allow you to customize Testim to fit your environment or special testing conditions. Don't worry, we'll support you if you get stuck. Let's jump right in!

Guides    Changelog

Parameters for groups

Learn how to pass parameters to groups to improve reuse

Groups can include parameters, which are variables that can be used to pass information into a test step. By using parameters in a test, you can test different scenarios without knowing the information in advance. For example, when testing a login scenario, you can use parameters to switch between various username and password options, such as a registered user versus a guest user, etc.
If the group is shared between multiple tests, the group parameters will be also available across all the tests and you will only need to set specific values for these parameters.
You can add parameters to groups the exact same way you add parameters to custom JavaScript steps. First you will need to create a group, add parameters, assign these parameters to specific steps in the group and then add values to these parameters.

Adding Parameters to a Group

To add parameters to a group:

  1. Create a group by following the instructions in the Groups section. In this example we will create a "Login group" that includes typical login steps.
  2. Click the group's Show Properties icon ().
  3. Click the + icon next to Params and then click JS.
  1. Enter a name for the first parameter, by clicking the Edit icon and then replacing the "param" text with the new name.

​5. Enter a value in the field below the parameter name. If the value is a constant string value use ' ' around it. For example, 'guest'. This value will be available in this test only.

  1. Repeat steps 4-5 to add additional parameters.
  1. Click Save and then OK.​

Assigning Parameters to Steps in a Group

To assign parameters to steps in a group:

  1. Double-click the group step to view the group's internal steps.

📘

Note

If it’s a shared group you will need to confirm that the changes will be applied on all related tests.

  1. Select the relevant step to assign the parameter and click the Show Properties icon (). For example, we will select the "Set text" step to assign the username parameter.
  2. In the Properties panel, in the Text to assign field, replace the current static value to the parameter's name (e.g. username).
  1. Repeat steps 1-3 to assign additional parameters to steps. For example, we will assign the password parameter to the Set password step.
  2. Click Save and OK.

That's it!
We have created a login group with parameters, that can be easily reused in other tests with a different set of values without the need to change the group itself.

Reusing the Group with the Parameters

To reuse the group with parameters:

  1. Add the group to another test by following the instructions in the Reusing a Group section. In this group, the parameters are already assigned to the relevant steps, but the values are empty.
  1. Click the group's Show Properties icon ().
    Notice that the parameters exist, but the values are not assigned.
  1. Click the Assign Nowdrop-down menu and select JS.
  2. In the empty field, enter the relevant value. If the value is a constant string value use ' ' around it.
  3. Repeat steps 3-4 for additional parameters.
  4. Click Save and OK.

Updated 16 days ago

Parameters for groups


Learn how to pass parameters to groups to improve reuse

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.