From e219aaf2b00a2b3939be5bb93c3071e3b3e1ea41 Mon Sep 17 00:00:00 2001 From: yevh-berdnyk Date: Fri, 6 May 2022 17:48:30 +0300 Subject: [PATCH] Fixed adding results to TestRail --- test/appium/support/testrail_report.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/appium/support/testrail_report.py b/test/appium/support/testrail_report.py index 6fe92a9394..ddcad9f4df 100644 --- a/test/appium/support/testrail_report.py +++ b/test/appium/support/testrail_report.py @@ -193,8 +193,11 @@ class TestrailReport(BaseTestReport): except IndexError: continue for res in results: - if re.findall(r"%s\?auth=.*#%s" % (device, str(last_testrun.first_commands[device])), - res['comment']): + if last_testrun.first_commands: + pattern = r"%s\?auth=.*#%s" % (device, str(last_testrun.first_commands[device])) + else: + pattern = device + if re.findall(pattern, res['comment']): res_id = res['id'] try: for geth in test.geth_paths.keys():