Update Execution Status via GAINSS API
The GAINSS API allows you to update the execution status of your test cases. This endpoint is publicly accessible and can be used outside of the GAINSS platform. Follow the guidelines below to utilize this API effectively:
GAINSS API URL: https://plugin.gtentechnologies.com
Endpoint: /api/v1/plugin/update-status
Method: POST
Headers:
- Authorization: Bearer {GAINSS_API_TOKEN}
- Content-Type: application/json
Errors:
- 400: Bad Request
- 401: Unauthorized
- 403: Forbidden
- 404: Not Found. If test cycle, iteration or testcase doesn't exist
- 500: Internal Server Error
Request Payload
{
"testcases": [
{
"testcaseKey": "TEST_CASE_KEY",
"status": "Pass/Failed",
"executionTime": 25
},
{
"testcaseKey": "TEST_CASE_KEY",
"status": "Pass/Failed",
"executionTime": 101
}
],
"iteration": "Iteration 1",
"testcycle": "YOUR_TEST_CYCLE_KEY"
}
- testcases: This field can include multiple test cases at a time. Each test case must contain:
- testcaseKey: The key for each test case should match the key displayed on the execution screen for every test case under an iteration.
- status: This should be one of the following values: Pass, Fail, Blocked, In Progress, or Not Executed. Alternatively, you can use any custom execution status name configured on the Configuration page in the GAINSS plugin.
- executionTime: This optional field represents the actual execution time of the test case, measured in milliseconds (ms).
- iteration: This should correspond with the iteration name shown in the Test Cycle on the left panel of the execution screen in the GAINSS plugin.
- testcycle: This should match the test cycle key.