Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ def for_loop_action(step_data, data_set_no):
values = get_data_set_nums(sr.get_previous_response_variables_in_strings(row[2].strip()), step_loop)
if step_loop:
loop_steps = [list(range(len(CommonUtil.all_step_dataset[i]))) if i in values else [] for i in list(range(len(CommonUtil.all_step_dataset)))]
CommonUtil.disabled_step += [i+1 for i in values]
CommonUtil.loop_consumed_step += [i+1 for i in values]
else:
loop_steps[step_index] += values
# outer_skip += loop_this_data_sets
Expand Down Expand Up @@ -711,6 +711,13 @@ def for_loop_action(step_data, data_set_no):
sr.Set_Shared_Variables(each_varname, each_val)
for step_cnt, each_step in enumerate(loop_steps):
if len(each_step) == 0: continue
if (step_cnt + 1) in CommonUtil.disabled_step:
CommonUtil.ExecLog(
sModuleInfo,
"STEP-%s is disabled. Skipping execution inside step loop" % (step_cnt + 1),
2
)
continue
inner_skip = []
outer_skip = each_step
CommonUtil.current_step_no = str(step_cnt+1)
Expand Down Expand Up @@ -818,11 +825,9 @@ def for_loop_action(step_data, data_set_no):
CommonUtil.ExecLog(sModuleInfo, "Condition matched. Continuing to next iteration", 1)
cont_break = True
break

if step_exit_fail_called or step_exit_pass_called:
die = True
break

if die or cont_break:
break
if die:
Expand Down
3 changes: 2 additions & 1 deletion Framework/MainDriverApi.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ def run_all_test_steps_in_a_test_case(
sTestStepStartTime = datetime.fromtimestamp(TestStepStartTime, tz=pytz.UTC).strftime("%Y-%m-%d %H:%M:%S.%f")
WinMemBegin = CommonUtil.PhysicalAvailableMemory() # get available memory

if StepSeq in CommonUtil.disabled_step or not this_step['step_enable']:
if StepSeq in CommonUtil.disabled_step or StepSeq in CommonUtil.loop_consumed_step or not this_step['step_enable']:
CommonUtil.ExecLog(sModuleInfo, "STEP-%s is disabled" % StepSeq, 2)
sStepResult = "skipped"
elif CommonUtil.testcase_exit:
Expand Down Expand Up @@ -2008,6 +2008,7 @@ def main(device_dict, all_run_id_info):
}
set_device_info_according_to_user_order(device_order, device_dict, test_case_no, test_case_name, user_info_object, Userid, run_id=run_id)
CommonUtil.disabled_step = []
CommonUtil.loop_consumed_step = []
CommonUtil.testcase_exit = ""

# Download test case and step attachments
Expand Down
5 changes: 3 additions & 2 deletions Framework/Utilities/CommonUtil.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
# -*- coding: cp1252 -*-

import selenium
Expand Down Expand Up @@ -147,7 +147,8 @@
jwt_token = ""
run_cancel = ""
run_cancelled = False
disabled_step = [] # 1 based indexing
disabled_step = [] # 1 based indexing (user requested step disable)
loop_consumed_step = [] # 1 based indexing (steps executed via step loop)
testcase_exit = ""
max_char = 0
compare_action_varnames = {"left":"Left", "right":"Right"} # for labelling left and right variable names of compare action
Expand Down
Loading