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

后端 未结 1 688
野的像风
野的像风 2021-02-10 07:59

How to run a particular test case multiple times and display the pass and fail count under Test Statistics?

Below is the current code I have to run a test case multiple

1条回答
  •  旧巷少年郎
    2021-02-10 08:44

    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}
    

    0 讨论(0)
提交回复
热议问题