TestExecutionTestStepLabels
Create test execution test step labels¶
Attempt to create test step labels for a test execution
Request¶
Request body¶
Attribute | Type | Required | Notes |
---|---|---|---|
testStepId | integer | yes | defines the test step id |
testStepLabelIds | array | yes | array containing integers that define the test step label ids |
Request body example¶
curl --location 'https://example.juno.one/test-steps-test-step-labels' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA' \
--header 'X-tenantID: example' \
--header 'Content-Type: application/json' \
--data '{
"testStepId": 1,
"testStepLabelIds": [
1
]
}'
import requests
import json
url = "https://example.juno.one/test-steps-test-step-labels"
payload = json.dumps({
"testStepId": 1,
"testStepLabelIds": [
1
]
})
headers = {
'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA',
'X-tenantID': 'example',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
val client = OkHttpClient()
val mediaType = "application/json".toMediaType()
val body = "{\n \"testStepId\": 1,\n \"testStepLabelIds\": [\n 1\n ]\n }".toRequestBody(mediaType)
val request = Request.Builder()
.url("https://example.juno.one/test-steps-test-step-labels")
.post(body)
.addHeader("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0QGp1bm8ub25lIiwidGVuYW50SUQiOiJkZXZlbG9wbWVudCIsImV4cCI6MTY4NDQ4MzYyNn0.cYdUo4oiHnkdAywSAb7EFus9PFg-2FYHZPj4gdMML-mKgUVZw9fewOo4QK6U3PqCzGWjFVksz8HULzyKMnV8AA")
.addHeader("X-tenantID", "example")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute()
Response¶
Successful response of test execution test step labels create has the status 200
with following response body:
400
Bad Request
404
Not found
406
Insufficient permision
412
Precondition failed