0

所以我正在尝试使用 XRAY api 来导入 JSON 作为测试执行。我已经尝试过创建测试执行并将其放在第一个标签中,并将实际的 TEST 问题放在场景标签中。错误中的自定义字段也是{"id":"customfield_11714","name":"Tests association with a Test Execution","custom":true,"orderable":true,"navigable":true,"searchable":true,"clauseNames":[],"schema":{"type":"array","custom":"com.xpandit.plugins.xray:testexec-tests-custom-field","customId":11714}},

在将测试执行添加为@BP-1084 之前,我会收到一个错误响应,即错误组装问题数据:无法设置字段'customfield_11714'。它不在适当的屏幕上,或未知。

JSON:

[
    {
        "uri": "C:\\TestProject\\Magento2-testing\\Source\\Features\\Magento2\\Orders.feature",
        "id": "orders",
        "tags": [
            {
                "name": "@BP-1084"
            }
        ],
        "keyword": "Feature",
        "name": "Orders",
        "line": 0,
        "description": "asd",
        "elements": [
            {
                "id": "orders",
                "tags": [
                    {
                        "name": "@BP-1079"
                    }
                ],
                "keyword": "Scenario",
                "name": "failed order",
                "line": 26,
                "description": "",
                "type": "scenario",
                "steps": [
                    {
                        "keyword": "Given",
                        "name": "I am on \"Home\" Page",
                        "line": 27,
                        "match": {
                            "location": ""
                        },
                        "result": {
                            "status": "passed",
                            "error_message": null,
                            "duration": 21847000000
                        },
                        "arguments": []
                    },
                    {
                        "keyword": "And",
                        "name": "I login with valid user",
                        "line": 28,
                        "match": {
                            "location": ""
                        },
                        "result": {
                            "status": "passed",
                            "error_message": null,
                            "duration": 27863000000
                        },
                        "arguments": []
                    },
                    {
                        "keyword": "And",
                        "name": "I add a physicalProduct to cart with quantity 1",
                        "line": 29,
                        "match": {
                            "location": ""
                        },
                        "result": {
                            "status": "failed",
                            "error_message": "chrome not reachable\n  (Session info: chrome=94.0.4606.71)\n  (Driver info: chromedriver=94.0.4606.61 (418b78f5838ed0b1c69bb4e51ea0252171854915-refs\/branch-heads\/4606@{#1204}),platform=Windows NT 10.0.19042 x86_64)",
                            "duration": 40077000000
                        },
                        "arguments": []
                    }
                ],
                "examples": []
            }
        ]
    }
]

ENDPOINT: POST rest/raven/1.0/import/execution/cucumber

https://docs.getxray.app/display/XRAY/Import+Execution+Results+-+REST#ImportExecutionResultsREST-CucumberJSONresults

4

1 回答 1

1

认为这个问题与您尝试更新的领域有关,并且只是您尝试与 Jira 交互的问题。该错误表明Custom Field 11714屏幕上不存在分配给(取决于问题是否已经存在)edit或分配给项目中目标问题类型的create上下文。screen schemeissue type screen scheme

尝试检查字段 id 是否正确,并且是否存在于正确的屏幕上,可能是editcreate或根据您的工作流程分配给相关转换的一个。

于 2021-10-05T11:59:13.793 回答