Forum Discussion
You can’t set the environment inside the testCase object. Instead, add "environmentId" directly in each execution item. That’s how Zephyr recognizes it. Keep other fields like testCase key and result separate.
Hi milekade8 , I've tried adding it as what you've suggested but still didn't work. Below were the combinations on what I've tried:
Using environment id for "environment" and "environmentId"
{
"version": 1,
"executions": [
{
"source": "My Request",
"result": "Failed",
"environment": 3814706,
"environmentId": 3814706,
"testCase": {
"name": "API response has status 200",
"key": "TESTKEY-T123123"
}
}
]
}Using QA for "environment" and "environmentName"
{
"version": 1,
"executions": [
{
"source": "My Request",
"result": "Failed",
"environment": "QA",
"environmentName": "QA",
"testCase": {
"name": "API response has status 200",
"key": "TESTKEY-T123123"
}
}
]
}
I was able to find a workaround and that is by sending each execution using the test execution endpoint (see this link) as it provides a parameter for the environment.