将测试结果发布到TFS时出错 [英] Getting an error when posting Test Results to TFS

查看:71
本文介绍了将测试结果发布到TFS时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先让我说我试图将自动化运行结果从Java代码发布到TFS中。

First of all let me say I am trying to post automation run results from Java code into TFS.

这是否可能?是

Is that even possible?

我已按照TFS Rest API上的说明首先创建一个新的测试运行:

(https://www.visualstudio.com/en- us / docs / integrate / api / test / runs#create-new-test-run)



然后我试图将结果添加到运行中,并且我收到了错误消息: 

" 值不能为null。\\ n参数名称:结果"

I have followed the instructions on the TFS Rest API to first create a new Test Run:
(https://www.visualstudio.com/en-us/docs/integrate/api/test/runs#create-new-test-run)

Then I'm trying to add a result to a run, and am getting the error: 
"Value cannot be null.\r\nParameter name: results"

此错误消息无效,因为没有名为"results"的字段。这个电话是存在的。

This error message is unhelpful, since no field named "results" exists for this call.

https://www.visualstudio.com/en-us/docs/integrate/api/test/results_1_0#add-test-results-to-a-测试运行

https://www.visualstudio.com/en-us/docs/integrate/api/test/results_1_0#add-test-results-to-a-test-run

以下是我的JSON代码:

Here is my JSON code below:

{

" ; testCaseTitle":" Post TFS Test Result",
" testCase" ;: {

" id":" 410421"

},
$
" priority":1,

" configuration" ;: {

" id":" 315"

},

" results":" Passed",
" startedDate":

}

{
"testCaseTitle": "Post TFS Test Result",
"testCase": {
"id": "410421"
},
"priority": 1,
"configuration": {
"id": "315"
},
"outcome": "Passed",
"startedDate":
}

JSON中是否必须有任何"自动"键才能生效?

Does there have to be any of the 'automated' keys in the JSON for this to work?

例如

"automatedTestName":{strin g。,"automatedTestStorage":{string}," automatedTestType" ;: {string}," automatedTestId":
{string}

推荐答案

James Afflec k,

此论坛讨论并提出要求有关扩展和集成Visual Studio的问题,由于您的问题与TFS更相关,我们会将其移至TFS论坛以获得适当的支持。

This forum discusses and asks questions about extending and integrating with Visual Studio, Since your issue is more related to TFS, we'll move it to TFS forum for suitable support.

感谢您的理解。

祝你好运,

Cole Wu


这篇关于将测试结果发布到TFS时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆