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

When adding parameters to groups, you can make it much more general and reusable.

You can add parameters to groups the exact same way you add parameters to custom JavaScript steps.

Let's go over a common scenario, where we want to create a login group which accepts a username and password parameters, and then set its value to the corresponding input fields.

Record the steps

First, we'll record simple flow of login:

  1. Set username.
  2. Set password.
  3. Click "Login".

​4. Select the login steps and group them together to a "Login" group.

  1. Select the "Login" group we created, and open its Properties panel
  2. Add 2 new JS params (JavaScript Parameters)

​Name the parameters and set their values:

  • username - set the values to 'demo_user'
  • password - set the value to '12345'

Note: When placing a constant value in the parameter value field use ' ' around it.

​Great, so now we have a group that gets two parameters (username and password). Now we need to set its inner steps to use those values.

The JavaScript parameters on the group are available to all its child steps simply by using their names.

  1. Step into the group, by double-clicking the group.
  2. Select the 'Set "User Name"' step.
  3. Change the value in the Properties panel from the current static value to the new group parameter:username​

​Now we'll do the same for the 'Set "Password"' step:

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

Updated 6 months 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.