The REST API provides the following methods to execute and monitor filter and conditional connector tests:

Refer to Testing Filter Configurations and Testing Conditional Connectors for details on filter testing backward compatibility for versions of Rhapsody prior to Rhapsody 6.4.

POST /api/test/<id>

URI POST /api/test/<id> 
Description

Starts a test run of all tests under the specified component ID. Valid component ID types are filters, route, folders, and lockers.

To run all tests in the engine, use a component ID of 0.

Request Header Empty.
Request Body Empty.
Response Header 204 No Content - operation successful. 
202 Accepted - the request is being processed. The URI provided in the Response Header can be used to check the status of the operation.
Response Body

The load status URI:

{{Location: https://localhost:8444/api/test/status/1}}
Access Rights 'View locker'.
'Test filter and conditional connector REST API'.

GET /api/test/status/<id>

URI GET /api/test/status/<id>
Description Returns the status of the current test run.
Request Header Accepts: application/json
Accepts: application/vnd.orchestral.rhapsody.6_5+json
Request Body Empty.
Response Header 200 OK - operation successful.
Response Body

Status of the current test run in JSON format. The response body has the following structure:

  • state - Current state of the test run: RUNNINGCOMPLETED.
  • results - [list] results if the state is COMPLETED:
    • total count - number of tests run.
    • passed count - number of tests passed.
    • failed count - number of tests failed.
    • executed count - number of tests executed.
    • skipped count - number of tests skipped.
    • error count - number of tests that had errors.
    • path - Path to the filter that had tests run.
    • filter tests - [list] Results of the filter level tests:
      • test name - [string] the test name.
      • test description - [string] the test description.
      • result - one of FAILEDPASSEDEXECUTEDSKIPPEDINVALIDERROR.
    • connector tests - [list] Results of the conditional connector level tests:
      • connector name -  [string] the name of the connector.
      • test name - [string] the test name.
      • test description - [string] the test description.
      • result - one of FAILEDPASSEDEXECUTEDINVALIDERROR.
Access Rights

'View locker'.
'Test filter and conditional connector REST API'.