Functions are a named set of test steps that can be used in a test case. If we find ourselves using the same set of test steps more than once, then using a function would be preferable.
There are two ways to create a function.
1. The first way is by selecting the steps.
- Select the check boxes (on the left) for the steps to be included in the function.
- Click on the Create Function icon which is highlighted below
- Give the function a name
- Click on Save
- A prompt will appear asking to replace the steps with the newly created function. Click Yes.
- Notice that the steps have been replaced with "CALL <function_name>"
2. The second way is to navigate to the Function library.
- Click on Flows > Functions
- Click on New Function
- Give the function a name
- Click on Save
- Fill in the steps for the function (just like a test case)
- Save the function
- Open test case and create a step: "CALL <function_name>"
Comments
Please sign in to leave a comment.