robotframework - Returning multiple PASS/FAIL -
if have list of strings ['pass', 'fail', 'pass']
, how can return multiple pass or fail status, depending on string? right have like:
test01 :for ${test} in @{tests} \ log console ${test} \ should match ${test} pass
the robot framework return:
test01 pass pass fail test01 | fail | 'fail' not match 'pass'
essentially want 1 test dynamically generate test_status arbitrary length list, , results like:
test01 pass | pass | pass | pass | fail test01 | fail | 'fail' not match 'pass'
you have create separate test cases, since test case has 1 status, pass
or fail
.
however, there ways ensure values in list handled. easiest, think, using test case template, this
test case [template] should equal : ${status} in @{values} \ ${status} pass
with template, steps run in continue on failure mode, means failure not prevent loop finishing. instead, failure(s) collected , used create final status.
Comments
Post a Comment