"Reuse" is one of the more basic principles of programming. Instead of copy-pasting the same twenty lines of code over and over, you write them once inside a method and call it whenever you need to. This principle works precisely the same in the world of automated testing. 

Groups and all custom steps: validations, actions, API's, Wait for are reusable at by default at Testim. You can, however, change this property at any point, both in the creation or in a later stage. 

For every (potential shared) step that you create, Testim will prompt you for a (meaningful) name, and whether you would like to make this step shareable or not. By default, it is shared.

How to know if it's reused

We made it easy for you to notice that it’s shared.

How to reuse

  1. Double check, and make sure your shared step have a meaningful name. 
  2. Choose the location, by hovering over one of the arrows (which turn into a plus), and then click on the plus menu.
  3. Search for the aforementioned shared step in the search box
  4. Select the step by clicking on it
  5. If your step expects you to pass parameters, don't forget to assign them. Each step passes its own parameters e.g. you could call the "login" with "David" as params at one test, and with "John" at another.

How to change only one instance of a group

Changing the shared step in one place will change it in all instances of the project. Although you can send different parameters, sometimes you need to make changes only for a specific test. For this purpose, you will want to clone the step

  1. Click "Replace with a clone"
  2. Give the new step a new name. 
  3. Decide whether the new step will also be defined as shared.

Note: It will not clone inner groups.


If you do not want to allow reuse of a specific step.

  1. Navigate to "Automate", and then to "Actions" tab.
  2. Select the shared actions you want to unshare.
  3. Click "delete" icon.

Note: It will not actually remove the steps from tests that use it. This will only remove it from the list of shareable components.

Did this answer your question?