Add test case parameters
Use test case parameters to keep your test case flexible and easy to maintain. Special task parameters control how the test runs, for example, which browser to use or how long to wait. Custom parameters let you define a value once and reuse it in multiple test steps, so you only need to update it in one place.
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.
