Execute TestSuite via API


CloudQA API lets you run a test suite and get the execution status via webAPI.

  • To run the test suite you would need an API key and test suite ID.
  • API key can be generated from My Account information under your account name menu in top right side corner of the CloudQA application.
  • Test suite ID can be found in the test suite details information from the TRURT Actions column.

Executing Test Suite via API

  • To run the test suite you need to send a POST request to the webAPI with your unique API key as header which will authenticate the execution.

  • POST request

    Syntax: https://app.cloudqa.io/api/v1/suites/< test suite suiteId>/runs
    
    Header: Authorization: ApiKey <insert_api_key_here>
    
  • An optional JSON format body can be added to the POST request to further customize the test suite execution like browser and variables. Below is a view of the request body

{
   "Browser": "Firefox",
   "Variables": {
                  "Variable1": "Value1",
                  "Variable2": "Value2"
                }
}
  • The API will immediately return with a status code of 202, and the returned body will contain a Run Id, and the current status (started).

  • As soon as you send the post request to the webAPI it will respond with a JSON body containing Run ID, and the status of execution as started.

  • This Run ID received in POST request can be used to check the status of the execution by sending a GET request to the webAPI. Use below URL syntax for sending the request.

Syntax: https://app.cloudqa.io/api/v1/suites/<suiteId>/runs/<runId>

results matching ""

    No results matching ""