Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,551,670
Community Members
 
Community Events
184
Community Groups

Cannot add attachments to test execution created by automation

Edited

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

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events