Closed shrikantsingh0585 closed 2 years ago
Hi @shrikantsingh0585 , I cannot reproduce this. Do you have any mode details, that might help me? I used the following snippet, assuming a
is a working Adaptavist instance:
test_run_key = a.clone_test_run(test_run_key="TEST-C412")
assert a.add_test_result_attachment(test_case_key="TEST-T12", test_run_key=test_run_key, attachment="README.md", filename="README.md")
Hi @Shutgun, Today I tried again and able to figure out the actual cause. When the test script (test step) is modified but test execution under any test cycle is not updated, this problem is faced. e.g.
So when test case is not updated with latest modifications (as stated in step-4), this issue is observed.
Used clone_test_run api for cloning a reference test run(test cycle). Then I used edit_test_result_status api for updating the test results. For adding attachments to executed test, when I tried to use add_test_result_attachment api, I get KeyError. However if the test run (test cycle) created manually, I am able to add attachments to test execution using same "_add_test_resultattachment" API.