question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Skipped tests will have fail status if suite teardown fails

See original GitHub issue

Robot Framework 4.0.3 (Python 3.6.8 on win32)

*** Settings ***
Documentation      ...

Library            SeleniumLibrary

Suite Setup        Suite Setup
Suite Teardown     Suite Teardown
Force Tags         example    noncritical

*** Variables ***

*** Test cases ***
Test Cases
    Wait Until Page Contains Element    css:img[alt="Google"]
    Page Should Contain Element         css:img[alt="Gogle"]    #non correct selector intentionally

*** Keywords ***
Suite Setup
    Open Browser    https://google.com    chrome

Suite Teardown
    No existed keyword    #non correct keywordintentionally
    Close All Browsers

command line: robot --skiponfailure noncritical example.robot

Expected result some thing like this: image

Really: image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
pekkaklarckcommented, Jun 4, 2021

Failing suite teardowns are such a special case that I don’t think handling them differently than now is worth the effort. Most importantly, it would be hard to come up with mechanism that would leave tests passed but would make it explicit for users that there is a problem to be fixed. Anyway, discussing about that doesn’t belong to this issue. If you think that behavior should be changed, submit a new issue or start discussion on our Slack.

1reaction
pekkaklarckcommented, Jun 3, 2021

If we’d leave tests passed after suite teardown failure, there would be no indication in report about that failure. This could mean that serious problems aren’t detected. We obviously could enhance report so that suite teardown failure is reported separately, but I don’t thing that’s worth the effort and all tests passing could nevertheless mean that the problem is ignored. For wider discussion see #2135.

As discussed in the aforementioned issue, you can wrap the teardown keyword with “Run Keyword And Ignore Error” or with “Run Keyword And Warn On Failure”. The latter was actually added partly with this use case in mind (#2294).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Test Suite TearDown Scenario - Google Groups
If the suite teardown fails, all test cases in the suite are marked failed, regardless of their original execution status. I dont see...
Read more >
Suite Teardown stop on keyword error - Robot Framework
Hello, I'm facing an issue on Suite Teardown. ... But I just discover than, in case of keyword issue (not a test failure)...
Read more >
robot framework stop teardown execution in failure
I use teardown in my test. It works as expected, if my test ends or fails, teardown starts the execution. My problem starts...
Read more >
Test Fixtures and Test Listeners (Test Hooks) - Katalon Docs
Tear Down If Passed, This method is called after executing all steps of the test case, if all of those steps are marked...
Read more >
std/unittest - Nim Programming Language
Tests can be nested, however failure of a nested test will not mark the parent test as failed. Setup and teardown are inherited....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found