Use reusable test steps
Reusable test steps are sets of steps that you can reuse across multiple test cases. If anything changes in your application under test and you update your reusable test steps, Tosca Cloud automatically updates all test cases that contain them. This reduces test maintenance effort, so you can focus on getting your application ready for release.
To create reusable test steps, follow these steps:
-
In the menu bar on the left, select
Create test case.
-
Select Reusable test steps. Then, select + Create reusable test step.
-
Use the editor to create your reusuable test steps. You can add standard objects, modules, and reusable test steps from the left pane.
-
Name your reusable test step and select Save.
You can now add your resuable test steps to your test cases. Just go to the test case and select Reusuable test steps from the left pane. Then select the plus icon next to the one you want to use.
To check which test cases—or other reusable test steps—use a particular reusable test step, select View references.
Convert test step folders into reusable test steps
If your test case has a test step folder you want to reuse, you can convert it into reusable test steps. To do so, follow these steps:
-
Go to the test case where you have the test step folder you want to convert.
-
In the center pane, find the test step folder you want to convert and select
. Then, select Convert into reusable test step.
Tosca Cloud creates reusable test steps with the same name as your test step folder. You can now view, edit, and use your new reusable test steps.
Convert reusable test steps into test step folders
After you add reusable test steps to your test case, you can convert them into a test step folder. Once you convert them, any changes you make to your new test steps do not affect your reusable test steps. That means you can edit them to fit your test case without changing your reusable test steps.
To convert your reusable test steps into a test step folder, follow these steps:
-
Add a reusable test step to your test case.
-
Select
. Then select Convert into test step folder.
Once you convert your reusable test steps, the business parameters become normal values in test steps.
Use business parameters
Business parameters display a summary of the relevant business-based information in a reusable test step.
To create and use business parameters in a reusable test step, follow these steps:
-
Hover over the test step Business Parameter.
-
Select
and select Create Parameter (child to selected).
-
Go to Test Steps and enter the parameter name in curly brackets: {PL[<Business Parameter Name>]}.
-
Use the reusable test step in a test case.
There are some limitations to using business parameters:
-
You can't use business parameters as a reference to other business parameters.
-
You can't nest business parameter values. For example, you can't use {PL[{PL[<Business Parameter Name]}]}.

Create reusable test steps
To create reusable test steps, choose one of the following options:
-
To create a reusable test step from scratch, select
next to Reusable test steps and enter a name. Then
Edit the newly created step and drop items into the test case editor. For example, you can add modules or standard test steps. Define the actions that Tosca Cloud should take, and your reusable test step is ready to go.
-
To turn existing test steps in your test case into reusable test steps, select these test steps. Then, select
Create reusable test step from the action bar. This creates a new reusable test step with the same values as you have in your test case. If you want to use different values in your reusable test step, you need to edit it.
Edit or delete reusable test steps
You can always edit or delete reusable test steps. Keep in mind that this affects all test cases that currently use these steps. You may need to adapt your test cases to keep them from breaking.
To edit or delete reusable test steps, select Edit and then proceed with one of the following:
-
Add or remove test steps, rearrange them, or change values.
-
Delete the entire set by selecting Delete reusable test step from the action bar.
Combine reusable test steps with parameters
To add a customizable element to a reusable test step, create a parameter for this particular step. This gives you flexibility with the values that you use in your test cases.
Let's say your reusable test step runs a Google search. If you use a parameter for the actual search term, you can reuse the steps across your test cases, with a different search term in each test case.
To create and use parameters in a reusable test step, follow these steps:
-
Create your reusable test step. Then, select
Edit to access the reusable test step builder.
-
Go to the Parameters tab and create a new parameter for this step.
-
If you enter a default value for the parameter, this value carries over into all test cases. However, you can still overwrite it in individual test cases. We recommend this option if you generally want to use the same value across test cases, with an exception here and there.
-
If you leave the default value empty, you must define a value in each test case. We recommend this option if you need to take the same basic steps in multiple test cases, but with different inputs.
-
-
Go back to the Test steps tab in the reusable test step builder. Then, use a parameter value expression in the step where you want to use the parameter value.
-
Use the reusable test step in a test case.
-
If you have a default value and you want to use it, you don't need to do anything.
-
If you don't have a default value—or want to overwrite the default value—enter a value for the parameter into the reusable test step element in your test case.
-
Create a parameter for a reusable test step, then use the default value or overwrite it.
Let's say you have a reusable test step called Google search. This step performs three actions:
-
Opens Google in a new browser tab with Browser: Open URL.
-
Enters a search term and selects the search button. Here, Tosca Cloud uses a mouse action without cursor. This ensures that Tosca Cloud really clicks the button and not the overlay with potential other search terms that Google adds when you enter a search term.
-
Closes the browser tab with Browser: Close tab.
You also have a parameter called Search term for this reusable test step. This parameter defines what Tosca Cloud enters into the search bar. The parameter has a default value: Tricentis Tosca.
In this screenshot, your test case uses the default value and enters Tricentis Tosca into the search bar:
Use the default value of a parameter in reusable test steps
And in this screenshot, your test case enters a different value, Automated testing:
Overwrite the default value of a parameter in reusable test steps
What's next
Check out other test design elements that help you build better test cases, faster:
You're done building? Do a trial run of your test case, so you can find and fix instabilities before you run your tests in earnest.