RunAPITest Statement

Description

Loads and runs the specified Service Test or API test when this step runs.

Syntax

If you are calling an entire test: RunAPITest APITestName, APITestInputParams, APITestOutputParams

If you are calling an API test action: RunAPITest APIActionName [APITestName], APITestInputParams, APITestOutputParams

Argument

Type

Description

APITestName

String

The name of the Service Test or API test to which you inserted a call using the Call to API Test/Action dialog box.

APIActionNameStringThe name of the Service Test or API action to which you insert a call using the Call to API Test/Action dialog box.
APITestInputParamInteger or StringThe value of the API test input parameters to use during the current test run.

APITestOutputParams

String

The local variable name of the API test output parameter.

IMPORTANT

  • You add this statement using the Call to API Test/Action dialog box. You cannot add this statement manually in the Editor. For more details about the Call to API Test/Action dialog box, see the Micro Focus UFT One User Guide.

  • The Service Test or API test is loaded only when the step runs (and not when the test opens). This can affect test maintenance because no warning is displayed if the called Service Test or API test is moved or deleted.

  • This statement cannot be added to a function library associated with a GUI test.

Example:

The following is an example of an inserted call to a Service Test or API test.

RunAPITest "MyAPITest", Param1, Param1, OutputParam

 

See also: