You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi,
I am using Adaptavist python module for automating our test execution. Using clone_test_run api for cloning a reference test run(test cycle). Then I use edit_test_result_status api for updating the test results. Next what I want to achieve is adding attachment (evidences) to test. For that I tried to use add_test_result_attachment api.
I observed a weird problem: If the test run is created manually, I could add an attachment using add_test_result_attachment without any issue. But when I call same API for a test run which is created automatically(using clone_test_run api) , I get keyError.
Traceback (most recent call last):
File "<pyshell#12>", line 1, in <module>
adaptavist_obj.add_test_result_attachment("NPUI-C8", "NPUI-T3", r"D:\WorkflowTeam\Squish_PoC\client.log", "New")
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\adaptavist\adaptavist.py", line 882, in add_test_result_attachment
test_result_id = self.get_test_result(test_run_key, test_case_key)["id"]
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\adaptavist\adaptavist.py", line 766, in get_test_result
response = self.get_test_results(test_run_key)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\adaptavist\adaptavist.py", line 711, in get_test_results
result["scriptResults"] = sorted(result["scriptResults"], key=lambda result: result["index"])
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\adaptavist\adaptavist.py", line 711, in <lambda>
result["scriptResults"] = sorted(result["scriptResults"], key=lambda result: result["index"])
KeyError: 'index'
Can anyone suggest a workaround or any solution for this?
Thanks