Skip to content

Rerunfailed for Templated Test Case Runs All Test Cases Again #3284

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

Closed
hael1 opened this issue Aug 28, 2019 · 2 comments
Closed

Rerunfailed for Templated Test Case Runs All Test Cases Again #3284

hael1 opened this issue Aug 28, 2019 · 2 comments

Comments

@hael1
Copy link

hael1 commented Aug 28, 2019

All test cases are run again for a test that uses a templates

Example:

*** Test Cases ***
Test using Template
    [Template]    Template_keyword
    [Teardown]    Teardown All
    Data1
    Data2
    Data3

===============
Results:
    Data1 - PASS
    Data2 - FAIL
    Data3 - PASS

=====

On call of --rerunfailed, all three test scenarios are ran again.

@pekkaklarck
Copy link
Member

You actually only have one test here. If you want to have multiple tests, you need to use something like this:

*** Settings ***
Test Template       Template Keyword
Test Teardown       Teardown All

*** Test Cases ***
Test using Template 1       Data1
Test using Template 2       Data2
Test using Template 3       Data3

I guess we could change --rerunfailed to be clever enough to only execute failed iterations if a test with a template contains multiple iterations. I personally don't think that's worth the effort because

  • it would be a rather big change,
  • I doubt running all iterations typically takes too much time,
  • it's possible to make iterations independent tests like illustrated above, and
  • the change could even cause backwards incompatibility problems.

I'm not totally against such change, though, so if someone else is interested to implement it (or to sponsor development) it could be added. If nobody shows interest, this issue will be closed.

@pekkaklarck
Copy link
Member

No interest in over five years. Closing.

@pekkaklarck pekkaklarck closed this as not planned Won't fix, can't repro, duplicate, stale May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants