Robotframework robot框架中的测试用例迭代

Robotframework robot框架中的测试用例迭代,robotframework,Robotframework,我有一个测试用例,我必须迭代测试用例的次数。有什么方法可以迭代测试用例吗 Signin-Personal-Account [Tags] Tvh2 Given Number of users signs in to their respective devices ${xyz} Then xyz sees that Sign in is successful When xyz signs out from the device Then xyz sees tha

我有一个测试用例,我必须迭代测试用例的次数。有什么方法可以迭代测试用例吗

Signin-Personal-Account
[Tags]  Tvh2
    Given Number of users signs in to their respective devices  ${xyz}
    Then xyz sees that Sign in is successful
    When xyz signs out from the device
    Then xyz sees that sign out was successful   
    And Signin is repeated for 5 times for Ellie```

测试必须重复5次。如何使测试用例迭代次数?

这可以使用for循环实现:

*** Test cases ***
Multiple sign in test
    :FOR    ${index}    IN RANGE   5
    \    Signin-Personal-Account 

*** Keywords ***
Signin-Personal-Account
    [Tags]  Tvh2
    Given Number of users signs in to their respective devices  ${xyz}
    Then xyz sees that Sign in is successful
    When xyz signs out from the device
    Then xyz sees that sign out was successful   

请确保根据您正在使用的robot framework版本检查循环的语法-

@sameem-我使用了相同的逻辑,但在第一次登录后,第二次它无法登录,我收到了一个错误,如-ProtocolError:('Connection aborted','BadStatusLine(''),我还使用了repet关键字。解决这个问题还有其他方法吗