Gets the status of Batch Test Execution request against a unique ‘Request Id’ and provides the download link for the results file after the test execution is complete. Refer here for initiating Batch Test Execution API.
To use this API, the app needs the Bot Builder Scope of Batch Tests Execution.
GET https://{host}/api/public/bot/{botId}/testsuite/{testSuiteName}/{testRunId}/status
Query Parameters
Parameter | Description |
---|---|
host | Environment URL, for example,https://bots.kore.ai |
BotID | Bot ID or Stream ID. You can access it from the General Settings page of the bot. |
testSuiteName | Name of the test suite as created in the Bot’s platform that is being executed |
testRunId | The unique ‘Request ID’ returned by the Batch Test Execution API to track the progress |
Authorization
Invoke the API with JWT in the header with the following syntax:
auth: {{JWT}}
Response content type
application/json
Sample Request
curl --location --request GET \ 'https://{host}/api/public/stream/{streamId}/testsuite/{testSuiteName}/{testRunId}/status' \ --header 'auth: {jwt-token}' \ --header 'bot-language: {language-code}'
Sample Response
- When the test execution is in progress
{ "_id": "tr-beaadxxb-xxxx-xxxe-axfb-xxxxcxbexdxa", "streamId": "st-xxxxxxxx-cxxd-xcaf-xxax-dxxxxxxffxdxb", "testSuiteId": "ts-deaxxxxc-xxxx-xxxe-axbx-bxxcxxxxfxxx", "status": "running", "utterance_count": 10, "result": { "_id": "tr-beaadxxb-xxxx-xxxe-axfb-xxxxcxbexdxa", "isPartialFailure": false, "status": "running", "testSuiteId": "ts-deaxxxxc-xxxx-xxxe-axbx-bxxcxxxxfxxx", "triggeredBy": "u-xxbdxecd-xxdx-xxex-xxxd-xxdxxxxdxxea", "streamId": "st-xxxxxxxx-cxxd-xcaf-xxax-dxxxxxxffxdxb", "botLanguage": "en", "runType": "inDevelopment", "utterance_count": 10, "startTime": "2021-01-07T17:05:34.509Z", "__v": 0 }, "totalUtterances": 10, "utterance_ran": 5, "percentage": 50 }
- When the test execution is in progress
{ "_id": "tr-beaadxxb-xxxx-xxxe-axfb-xxxxcxbexdxa", "streamId": "st-xxxxxxxx-cxxd-xcaf-xxax-dxxxxxxffxdxb", "testSuiteId": "ts-deaxxxxc-xxxx-xxxe-axbx-bxxcxxxxfxxx", "status": "running", "utterance_count": 10, "result": { "_id": "tr-beaadxxb-xxxx-xxxe-axfb-xxxxcxbexdxa", "isPartialFailure": false, "status": "completed", "testSuiteId": "ts-deaxxxxc-xxxx-xxxe-axbx-bxxcxxxxfxxx", "triggeredBy": "u-xxbdxecd-xxdx-xxex-xxxd-xxdxxxxdxxea", "streamId": "st-xxxxxxxx-cxxd-xcaf-xxax-dxxxxxxffxdxb", "botLanguage": "en", "runType": "inDevelopment", "utterance_count": 10, "startTime": "2021-01-07T17:05:34.509Z", "__v": 0 "endTime": "2021-01-07T17:07:37.544Z", "f1_score": "0.00", "fileId": "5ff73fd98a3d9a5cbbd7c32b", "precision": "0.00", "recall": "0.00", "results": { "TP": 0, "TN": 0, "FP": 0, "FN": 0, "success": 0, "failure": 10, "totalEntitiesCount": 0, "matchedEntitiesCount": 0, "failedUtteranceCount": 10, "failedEntitiesCount": 0 }, "fileUrl": "{{url}}" } }