【问题标题】:Azure devops rest API postman error Value cannot be null.\r\nParameter name: TestPointUpdateParamsAzure devops rest API postman 错误值不能为空。\r\n参数名称: TestPointUpdateParams
【发布时间】:2021-08-29 22:40:55
【问题描述】:

您好,我正在尝试使用邮递员使用 azure devops rest api 将测试点的结果从 active 更新为 passed

这是我正在使用的请求:

PATCH https://dev.azure.com/fodservices/Training%20projects/_apis/testplan/Plans/70152/Suites/70154/TestPoint?api-version=6.1-preview.2

这就是身体

{
    "value" : [
    {
            "id": 11431,
            "isActive": false,
            "results": {
                
                "outcome": "passed"
            }
    }
]
}

我收到 400 错误请求错误,消息是:值不能为空。\r\n参数名称:TestPointUpdateParams 任何人都可以帮助我做错了什么

【问题讨论】:

标签: azure rest postman azure-devops-rest-api


【解决方案1】:

根据我的研究,我们需要将请求正文更新为以下 json。更多详情请参考here

[
    {
            "id": 1,
            "results": {              
                  "outcome": "passed"
            }         
    }
]

例如

PATCH https://dev.azure.com/{organization}/{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/points/{pointIds}?api-version=6.0

[
    {
            "id": 1,
            "results": {              
                  "outcome": "passed"
            }         
    }
]

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-01-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-09-13
    • 1970-01-01
    • 2020-12-22
    相关资源
    最近更新 更多