Run a test case Multiple times and display the pass and fail count under test statistics

二次信任 提交于 2019-12-03 08:21:56
Mann

Instead of using "Repeat Keyword", use For loop. Use "Run Keyword And Return Status" instead of "Run Keyword And Continue On Failure ".

*** Test Cases ***
Test Me
    ${fail}=  Set Variable  0
    :FOR  ${index}  IN RANGE  5
    \  ${passed}=  Run Keyword and Return Status    Execute
    \  Continue For Loop If  ${passed}
    \  ${fail}=  ${fail} + 1
    ${success}=  Set Variable  5 - ${fail}
    Log Many   Success:  ${success}
    Log Many   fail:  ${fail}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!