我正在尝试使用 Xray REST API 创建测试。在创建时,我还尝试将测试用例添加到已经存在的测试集中。
这是我的 POST 输入 json。
{
"fields": {
"project":
{
"key": "TEAM"
},
"summary": "Sum of two numbers-1",
"description": "example of manual test-1",
"issuetype": {
"name": "Test"
},
"customfield_23240": { "value": "Manual" },
"customfield_23244": {
"steps": [
{
"index": 0,
"step": "Step 1",
"data": "input Data 1",
"result": "Excepted result 1"
},
{
"index": 1,
"step": "Step 2",
"data": "input Data 2",
"result": "Excepted result 2"
},
{
"index": 2,
"step": "Step 3",
"data": "input Data 3",
"result": "Excepted result 3"
},
{
"index": 3,
"step": "Step 4",
"data": "input Data 4",
"result": "Excepted result 4"
}
]
},
"customfield_23246": {
"set": [
"TEAM-12"
]
}
}
}
我已经仔细检查了自定义字段 ID,它们是正确的。
这是我正在运行的命令
curl -H "Content-Type: application/json" -X POST --data @test-1.json -u user:pwd https://myserver/rest/api/2/issue
但我收到 http 500 错误。
{"errorMessages":["Internal server error"],"errors":{}}
我是在做错什么,还是在做一些 API 不支持的事情。从 X 射线文档中我不清楚。