Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Run Teardown Only Once' is executed for each test case #468

Closed
eldaduzman opened this issue Mar 26, 2022 · 7 comments
Closed

'Run Teardown Only Once' is executed for each test case #468

eldaduzman opened this issue Mar 26, 2022 · 7 comments
Labels

Comments

@eldaduzman
Copy link

When using the following syntax:

Suite Teardown  Run Teardown Only Once  Finalize

The expected behavior is that the Finalize key word will be executed only once at the end of the test.
But the actual behavior is that it gets executed at the end of every test.

In the attached file, the ini.robot file has the suite setup and teardown.
The setup indeed executed only once at the beginning.

To reproduce the bug, extract the attached 7z file, install all dependencies from the requirements file, and then execute the following:
pabot --pabotlib --testlevelsplit --processes 2 --outputdir results -P . tests

pabot-bug.zip

@mkorpela mkorpela added the bug label Jul 31, 2022
@mkorpela
Copy link
Owner

Hey,
This seems like a valid bug. DataDriver will make a new set of executions and skipped execution already executes the Finalize.
Thanks for the report!

@mkorpela
Copy link
Owner

I did get this partially fixed. Problem is with dynamically generated execution items and tools inability to detect when something is executed "last" in this case.

@mkorpela
Copy link
Owner

Ok. I think I got it fixed in good enough way 11b2199

@mkorpela
Copy link
Owner

This should work with datadriver generated tests, but there is theoretical possibility that for dynamically created executions (== DataDriver) there could be more than one "last".

@mkorpela
Copy link
Owner

Released in 2.5.5

@liutiymag
Copy link

I faced with the same issue in 2.16.0

@liutiymag
Copy link

@mkorpela any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants