Exitonfailure and SKIP

Hello everyone,

It is possible to set SKIP for all test cases (in suite tests) after the first test case FAIL ?

With Exitonfailure, robot set FAIL for all test cases, it is not a parameter ?

Thx

Well we have these options:

    --skip tag *          Tests having given tag will be skipped. Tag can be
                          a pattern.
    --skiponfailure tag *  Tests having given tag will be skipped if they fail.
                          Tag can be a pattern 

You can use --skiponfailure but the your test would not be marked Failed, but in the Setup of next tests you could define the tag robot:skip . I actually did some experiments, and failed. So, see below my working example.

*** Keywords ***
Bail Out
    Skip If    "${PREV_TEST_STATUS}" in ["FAIL", "SKIP"]

*** Settings ***
Library           selenium_library

*** Test Cases ***
first test
    No Operation
    Log    ${TEST_DOCUMENTATION}
    Close All Browsers
    [Teardown]    Log    ${TEST_STATUS}

second test
    [Setup]    Bail Out
    No Operation

third test
    [Setup]    Bail Out
    Log To Console    This is test three

Note: Forgot to mention my sponsor :wink: I have used RIDE 2.1.5.2 to create this example :smiley:

1 Like

Thx Hélio, but I need to have my request. It’s important to have the difference between FAIL and SKIP
I tried to do a listener but It doesn’t work !