I'm not able to update the testCase defined on Rally using pyral
Below is the code snippet I am using:
# Get the testcase that needs to be updated
query_criteria = 'FormattedID = "%s"' % tc
rally_response = rally_obj.get('TestCase', fetch=True, query=query_criteria)
target_project = rally.getProject()
testcase_fields = {
"Project" : target_project.ref,
"Workspace" : "workspace/59461540411",
"Name" : "test",
"Method" : "Automated",
"Type" : "Acceptance",
"Notes" : "netsim testing",
"Description" : "description changing",
#"TestCase" : "testcase/360978196712"
}
testcase_response = rally.put('TestCase', testcase_fields)
The status code of the testcase_response is "200" , but the Test Case is not updated.
What is wrong?
You are mixing 2 functions:
rally.put: to create a new WorkItemrally.update: to modify an existing WorkItemWhen you modify an item, you need the reference,
FormattedID, or Object ID of the Workitem.Your code should look like something like that:
NOTE: you don't have to have double quotes
"in the query.