无法使用 TTM4J API 更新测试用例

问题描述 投票:0回答:1

我正在 Jira - TTM4J 上使用 Tricentis 测试管理工具 来跟踪需求、测试用例和测试运行。我现在希望自动化一些实践,因此求助于他们的 API。

我正在尝试使用 TTM4J API 更新 TTMJ 上的测试用例 Jira 上的测试用例,但是我不断收到内部服务器错误,并且 Jira 上没有进行任何更改。

邮递员截图

如何使用 TTM4J API 更新测试用例?

这是我如何访问 api 端点的

网址

{{baseUri}}/v1/projects/{{projectKey}}/测试用例/{{testCaseKey}}

  • baseUri =“https://api.ttm4j.tricentis.com/”
  • 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 jira-rest-api jira-plugin
1个回答
0
投票

我是 Jira Tricentis 测试管理团队的负责人。

请通过插件内的聊天联系我们: 在此输入图片描述

© www.soinside.com 2019 - 2024. All rights reserved.