Get Rally Test Case _ref id in order to update test case result

58 views Asked by At

In order to update a test case result in Rally, I am using this payload. The payload works without any issue as long as I can get provide _ref id for the test case. I am able to obtine the _ref id using pyral but wanted to swich over to Rally Rest API as documented here - Rally API.

{
    "TestCaseResult": {
        "Build": "qa_test",
        "Date": curr_time,
        "Notes": "any note",
        "TestCase": {
            "_ref": f"https://rally1.rallydev.com/slm/webservice/v2.0/testcase/{obj_id}",
        },
        "Verdict": "Pass"
    }
}

thanks in advance

I could not find any documentation to obtine ref id for a test case. I have tried using pyral but I am trying to switch over to rest api from Rally

1

There are 1 answers

0
Joel Sherriff On

What do you know about the TestCase you want the ref for? You can query for TestCases which match your criteria using the API. For example:

https://rally1.rallydev.com/slm/webservice/v2.0/testcase?query=(Name = "Example TestCase")

Which will return info about matching TestCases including their refs. See the docs for more details about how to query using the API.