Documentation

Looking for something in particular?

An Introduction to Callable Tests

It is possible to convert a test case into a Callable test case. This is recommended to encapsulate functionality and make it reusable across several test cases.

These tests also reduce test maintenance since they provide a centralized location for regularly used functionality. 

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 called test and return output parameters.

Then, save the test case.

Invoke a Callable Test Case


To invoke a Callable test case, first, open the test case that should be called. Then locate the 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 Value Visibility


As your tests get more sophisticated, there is a danger that called test cases would start ‘stepping on each other’s 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, and one will not overwrite the other.
  • Folder values and Global values are shared between test cases.

For more information, check out this course on University of Provar.


Feedback

Was this article helpful for you?
Documentation library

Trying to raise a case with our support team?

We use cookies to better understand how our website is used so we can tailor content for you. For more information about the different cookies we use please take a look at our Privacy Policy.

Scroll to Top