We're here to help
Using callable tests
An Introduction to Callable Tests
You can use Provar to create callable tests. This is basically a fancy word for creating a component of a test that you can use again and again. Callable Tests reduce test maintenance since they provide a centralized location for regularly used functionality. When changes occur to the functionality of the system, updates are required in fewer locations.
Create a Callable Test Case
Define the main Parameters and Settings in the Test Case. Then set ‘Callable’ on the Callable dropdown:
This will add a small red image against the Test Case in the Navigator to indicate that the Test Case is Callable.
You can now pass parameters into the Callable Test and also return output parameters. Refer to Configure Parameters for more information.
Then save the Test Case.
Invoke a Callable Test Case
To invoke a Callable Test Case, first open the Test Case which should call it. Then locate the Callable Test Case in the Navigator and click and drag it into the Calling test:
You will note that the Call is created as a new Test Step, containing Input and Output Parameters. These values can then be defined as required.
Callable Test Case Visibility
As your tests get more sophisticated, there is a danger that called Test Cases will start ‘stepping on each others toes’, with called Test Cases overwriting values on which other Test Cases depend.
Provar observes the following rules to mitigate these issues:
- Called Test Cases cannot ‘see’ their Caller’s values. These need to be passed as Input Parameters if required
- The Calling Test Case cannot see the Called Test Case’s values. These need to be returned as Output Parameters if required
- If a Called Test Case defines a value with the same name as the Calling Test Case, these values are kept separate from each other and the one will not overwrite the other
- Folder values and Global values are shared between Test Cases