Rally add test case results in bulk using web services API

前端 未结 1 358
情深已故
情深已故 2021-01-25 02:15

We are about to start the phase of updating test results in Rally via the api.

I couldn\'t find an example to do this via the web services API (e.g. posting xml). Can an

相关标签:
1条回答
  • 2021-01-25 02:56

    If you're doing a simple POST against the Test Case Result Create REST endpoint:

    https://rally1.rallydev.com/slm/webservice/1.41/testcaseresult/create

    Then the appropriate XML payload would be:

    <TestCaseResult>
    <Build>2345</Build>
    <Date>2012-12-11T23:05:49.365Z</Date>
    <TestCase ref="/testcase/12345678910"/>
    <Tester ref="/user/12345678911"/>
    <Verdict>Pass</Verdict>
    </TestCaseResult>
    

    Where the long integers are the ObjectID's of the TestCase to which the result associates, and the Rally User that is the tester.

    I'll also include the JSON syntax, since Webservices 2.0 will be JSON-only:

    https://rally1.rallydev.com/slm/webservice/1.41/testcaseresult/create.js

    Payload:

    { "TestCaseResult" : {
          "Build" : "2345",
          "Date" : "2011-10-13T23:05:49.365Z",
          "TestCase" : { 
              "_ref" : "/testcase/12345678910.js"
            },
          "Tester" : {
              "_ref : "/user/12345678911.js"
            },
          "Verdict" : "Fail"
        }
    }
    

    As far as I'm aware, there's not a pre-built connector for uploading JUnit results into Rally. Some customers find the Rally Excel Add-in to be useful for bulk uploading TestCaseResults, amongst other things. You just have to specify a column in your import worksheet that has the Rally ObjectID or FormattedID of the TestCase(s) to which you want to associate your results.

    0 讨论(0)
提交回复
热议问题