2015-04-17 81 views
1

在拉力更新測試用例最後的判決,我能夠成功地更新我的測試用例的判決,但同時更新使用https://rally1.rallydev.com/slm/webservice/v2.0/testcase/28428199725?key=5d4291cf-XXXX-bb3e-b015f486695f得到以下錯誤最後判決:如何使用REST API

"Warnings": [ 
     "Ignored JSON element Result.Build during processing of this request.", 
     "Ignored JSON element Result.LastRun during processing of this request.", 
     "Ignored JSON element Result.LastVerdict during processing of this request." 

我用以下的有效載荷:

{"Result":{"Build":"12.0.0.260", "LastRun":"2015-04-16T19:56:05.000Z", "LastVerdict":"Fail" }} 

有人能幫我更新最後的判決嗎?

回答

0

LastVerdict從最近記錄的TestCaseResult彙總到TestCase。因此,你應該創建一個新的TestCaseResult和其關聯到你的測試用例:

POST https://rally1.rallydev.com/slm/webservice/v2.0/testcaseresult/create

身體:

{ 
    "TestCaseResult": { 
     "Build": "master-39721", 
     "Date": "2015-04-02T21:42:13.000Z", 
     "Notes": "Logs indicate pass, however code still doesn't produce expected result.", 
     "TestCase": { 
      "_ref": "https://rally1.rallydev.com/slm/webservice/v2.0/testcase/28428199725", 
     }, 
     "Verdict": "Inconclusive" 
} 
+0

由於它其實同我用下面的curl命令取得了爲我工作。 ** curl --header「zsessionid:_v1txcplHMCzUNCO7tTvk71u7URzWMhSQI」-H「Content-Type:application/json」-d「{\」TestCaseResult \「:{\」Build \「:\」12.0.0.2 \「,\」TestCase \「:\」/ testcase/8199725 \「,\」Date \「:\」2015-04-14T19:56:05.000Z \「,\」Verdict \「:\」Inconclusive \「}}」https:/ /rally1.rallydev.com/slm/webservice/v2.0/TestCaseResult/create** – Siraj