To import the test cases from a given Test Suite file.
To use this API, app needs the Bot Builder Scope of Batch Tests Management
OR the Admin API Scope of Batch Tests Management.
POST https://{host}/api/public/bot/{botId}/testsuite/import
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. |
Body Parameters
Parameter | Description |
---|---|
fileName | File containing the Batch Test suite details. |
fileType | JSON. |
importType | new/update |
delimiter | Field delimiter in the file |
description | Test suite description |
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 POST \ 'https://{host}/api/public/stream/{streamId}/testsuite/import' \ --header 'auth: {jwt-code}' \ --header 'bot-language: {language-code}' \ --header 'Content-Type: application/json' \ --data-raw '{ "delimiter": ",", "description": "fcgfddfg", "fileName": "5ff70b47a664d31999d9202c", "fileType": "json", "importType": "update", "name": "hgf" }'
Sample Response
{ "_id": "ts-8304802f-6f85-5f67-8964-de04446c1c93", "name": "hgf", "description": "fcgfddfg", "streamId": "st-15864388-c33d-5caf-86a6-d17951ff3d5b", "language": "en", "fileId": "5ff70b47a664d31999d9202c", "createdBy": "u-49bd0ecd-18d1-53e1-988d-84d3004d79ea", "createdOn": "2021-01-05T17:43:43.927Z", "modifiedOn": "2021-01-07T13:48:14.169Z", "__v": 0, "fileName": "sampleBatchtesting (2) (copy) (1).json" }