Add cases to a test set
curl --request POST \
--url https://guidinghand.ai/v1/test_sets/{test_set_id}/cases \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"test_case_ids": [
"<string>"
],
"repeat": 10
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({test_case_ids: ['<string>'], repeat: 10})
};
fetch('https://guidinghand.ai/v1/test_sets/{test_set_id}/cases', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://guidinghand.ai/v1/test_sets/{test_set_id}/cases"
payload = {
"test_case_ids": ["<string>"],
"repeat": 10
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"object": "test_set",
"test_set_id": "ts_3nV0qR7cWb1e",
"name": "Lenovo Win10 benchmark",
"description": "<string>",
"repeat": 10,
"customer": {
"persona": "Retired teacher. Not technical. Short, polite answers.",
"facts": {
"Wi-Fi network": "HomeNet",
"Wi-Fi password": {
"secret": "blue-kite-42"
}
},
"clicks_admin_prompts": true,
"does_steps": true
},
"cases": [
{
"test_case_id": "<string>",
"key": "<string>",
"repeat": 10
}
],
"case_count": 123,
"metadata": {
"customer_id": "cus_42"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"answered_by": "customer",
"test_case_ids": [
"<string>"
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"answered_by": "customer",
"test_case_ids": [
"<string>"
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"answered_by": "customer",
"test_case_ids": [
"<string>"
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"answered_by": "customer",
"test_case_ids": [
"<string>"
]
}
}Test sets
Add cases to a test set
Adds the cases at the end, or, for cases already in it, changes their repeat. Needs the admin role or an API key.
POST
/
v1
/
test_sets
/
{test_set_id}
/
cases
Add cases to a test set
curl --request POST \
--url https://guidinghand.ai/v1/test_sets/{test_set_id}/cases \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"test_case_ids": [
"<string>"
],
"repeat": 10
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({test_case_ids: ['<string>'], repeat: 10})
};
fetch('https://guidinghand.ai/v1/test_sets/{test_set_id}/cases', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://guidinghand.ai/v1/test_sets/{test_set_id}/cases"
payload = {
"test_case_ids": ["<string>"],
"repeat": 10
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"object": "test_set",
"test_set_id": "ts_3nV0qR7cWb1e",
"name": "Lenovo Win10 benchmark",
"description": "<string>",
"repeat": 10,
"customer": {
"persona": "Retired teacher. Not technical. Short, polite answers.",
"facts": {
"Wi-Fi network": "HomeNet",
"Wi-Fi password": {
"secret": "blue-kite-42"
}
},
"clicks_admin_prompts": true,
"does_steps": true
},
"cases": [
{
"test_case_id": "<string>",
"key": "<string>",
"repeat": 10
}
],
"case_count": 123,
"metadata": {
"customer_id": "cus_42"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"answered_by": "customer",
"test_case_ids": [
"<string>"
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"answered_by": "customer",
"test_case_ids": [
"<string>"
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"answered_by": "customer",
"test_case_ids": [
"<string>"
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"answered_by": "customer",
"test_case_ids": [
"<string>"
]
}
}Authorizations
An org API key (gh_live_…) from Settings → API keys in the console.
Path Parameters
The test set’s id (ts_…).
Body
application/json
Response
OK
A list of test cases to run together.
Example:
"ts_3nV0qR7cWb1e"
Example:
"Lenovo Win10 benchmark"
Tries per case unless the case or the run says otherwise (1 to 20).
Required range:
1 <= x <= 20The simulated customer for its cases that have none of their own.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Your own ids and labels (e.g. a ticket or customer id), returned as given.
Show child attributes
Show child attributes
Example:
{ "customer_id": "cus_42" }