我正在 Jira - TTM4J 上使用 Tricentis 测试管理工具 来跟踪需求、测试用例和测试运行。我现在希望自动化一些实践,因此求助于他们的 API。
我正在尝试使用 TTM4J API 更新 TTMJ 上的测试用例 Jira 上的测试用例,但是我不断收到内部服务器错误,并且 Jira 上没有进行任何更改。
如何使用 TTM4J API 更新测试用例?
{{baseUri}}/v1/projects/{{projectKey}}/测试用例/{{testCaseKey}}
在授权中包含承载令牌
{
"fields": {
"summary": "example",
"description": "example",
"priority": "High"
},
"ttmFields": {
"precondition": "example",
"steps": [
{
"expectedResult": "example",
"description": "example"
}
]
}
}
状态代码:500
身体:
{
"message": "Unable to update fields in Jira for {tesCaseKey}"
}
PUT /v1/projects/<censored>/test-cases/<censored> HTTP/1.1
Content-Type: application/json
Authorization: <censored>
User-Agent: PostmanRuntime/7.42.0
Accept: */*
Cache-Control: no-cache
Postman-Token: <censored>
Host: api.ttm4j.tricentis.com
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 405
{
"fields": {
"summary": "example",
"description": "example,
"priority": "High"
},
"ttmFields": {
"precondition": "example",
"steps": [
{
"expectedResult": "example",
"description": "example"
}
]
}
}
HTTP/1.1 500 Internal Server Error
Date: <censored>
Content-Type: application/json; charset=utf-8
x-amzn-RequestId: <censored>
Referrer-Policy: no-referrer
x-amzn-Remapped-Content-Length: 60
X-Frame-Options: SAMEORIGIN
RequestId: ZkWl9TVa
Content-Security-Policy: default-src 'self'
x-amzn-Remapped-Connection: keep-alive
x-amz-apigw-id: <censored>
Cache-Control: no-store
x-amzn-Remapped-Server: <censored>
X-Content-Type-Options: nosniff
Version: <censored>
x-amzn-Remapped-Date: <censored>
Content-Length: 60
Age: 2
Connection: keep-alive
Via: <censored>
{"message":"Unable to update fields in Jira for <censored>. "}
更新了测试用例,其响应正文如文档
中所示示例
{
"id": "a00fbc94-8e87-44da-b89e-85b83d9c1c65",
"key": "TE-1",
"project": "TE",
"testType": "Manual",
"fields": {
"summary": "Test 1 status",
"description": "Test 1 description",
"status": "Backlog",
"priority": "High",
"labels": [
"My Label"
]
},
"ttmFields": {
"precondition": "A precondition",
"steps": [
{
"testCaseKey": "TE-2",
"testCaseId": "10000"
}
]
}
}
我是 Jira Tricentis 测试管理团队的负责人。
请通过插件内的聊天联系我们: 在此输入图片描述