如果测试用例中的验证点失败,测试执行不应停止,它应该记录失败并继续机器人框架中的剩余脚本

问题描述 投票:0回答:0

我的测试用例中有一些验证点。即使验证部分失败,测试用例的执行也不应停止,它应该记录失败消息并继续执行剩余的脚本

*** Test Cases ***
Validating Dropdown
    ${sums}=  ['1234','455','4689','9837']
    ${sum2}=  ['1234','455','46','9837']

    ${sum_count}=  Get Length  ${sums}
    FOR  ${i}  IN RANGE  ${sum_count}
        ${sums}[${i}]==${sum2}[${i}]
    END

    ${sums3}=  ['12','455','4689','9837']
    ${sum4}=  ['34','455','46','9837']

    ${sum_count1}=  Get Length  ${sums3}
    FOR  ${i}  IN RANGE  ${sum_count}
        ${sums3}[${i}]==${sum4}[${i}]
    END
    ${sums5}=  ['1234','455','4689','9837']
    ${sum6}=  ['1234','455','4689','9837']

    ${sum_count2}=  Get Length  ${sums5}
    FOR  ${i}  IN RANGE  ${sum_count}
        ${sums5}[${i}]==${sum6}[${i}]
    END

整个脚本将在for循环中运行它不应该停止即使特定验证失败它应该继续执行脚本并记录每个验证的结果无论是失败还是通过

整个脚本将在for循环中运行它不应该停止执行即使特定的验证失败它应该继续执行脚本并记录每次验证的结果无论它是失败还是通过Robot Framrwork

python-3.x pycharm robotframework
© www.soinside.com 2019 - 2024. All rights reserved.