Add test case parameters
Tosca Cloud offers different types of parameters for test cases:
-
Special task parameters that perform "background work", typically related to your test environment. These parameters help you to adapt your test case to specific test requirements. For example, define default wait times or run this test case in a specific browser.
-
Custom parameters that allow you to use the same value in multiple steps in your test case. These parameters help you to avoid repetitions and to keep your maintenance down. For example, if you have to insert the same 20-digit code into various places in your application. In this case, you don't need to copy and paste. Instead, create a parameter for the code and reference it in all test steps that need it.
Set parameters
To set a parameter for your test case, open the Configurations side panel and create a new parameter.
To set a parameter for your test case in the old test case editor, go to the Parameters tab and create a new parameter.
-
For special task parameters, you need to enter a specific name and value. For a list of all available special task parameters, names, and values, check out Supported parameters.
-
For custom parameters, you can choose your own name and value. Give your parameter a name that's easy to remember, use, and understand in a test case.
Configurations side panel with parameters in the test case editor
Reference parameters
With special task parameters, you don't have to reference anything. You set the parameter, and the test case performs actions in a certain way, based on the parameter. That's it.
With custom parameters, you have to enter a parameter value expression in all test steps that should use the custom parameter value. For detailed information and an example, check out Parameter values.
Edit parameters
You can change parameters at any time. Tosca Cloud applies the change the next time you run the test case.
To change a parameter, open the Configurations side panel in your test case and make your changes.
To change a parameter in the old test case editor, go to the Parameters tab in your test case and make your changes.
Delete parameters
You can delete parameters at any time.
For custom parameters, double-check your test case before you do. Make sure that deleting the parameter doesn't break anything:
-
If you no longer need a test step that references the parameter, delete it.
-
If you want to keep the test step, but use a static value or a different parameter value, modify the test step.
To delete a parameter, open the Configurations side panel, select a parameter, then select Delete.
To delete a parameter in the old test case editor, go to the Parameters tab, select a parameter, then select Delete.
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.