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

Add skip retry tag #9

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

MummanaSubramanya
Copy link

@MummanaSubramanya MummanaSubramanya commented Jul 31, 2024

Reason for Adding the Skip Retry Tag

I want to add this skip retry tag because I have 60 test cases with the test:retry(1) tag at the suite level https://github.com/MarketSquare/robotframework-retryfailed/pull/9/files#diff-64f4b9829f275355a1230bb6c4f84b3f8f04c9a1050ad6fb6960b8ecd5a803f4R2. If I want to skip the retry for one particular test, I need to individually add test:retry(1) to all the remaining 59 tests and leave out that specific test, which is time-consuming. Hence, this change will help me streamline the process.

@MummanaSubramanya
Copy link
Author

@Snooz82 if you could review that would be great :)

@Snooz82
Copy link
Member

Snooz82 commented Jul 31, 2024

i can check it maybe tomorrow.

what is the “difference” between skip and test:retry(0) ?
and have you tried the - that has been introduced to Robot to “remove” tags from a test?
like -test:retry(1) ?

@MummanaSubramanya
Copy link
Author

MummanaSubramanya commented Jul 31, 2024

for tag in test.tags:

i can check it maybe tomorrow.

what is the “difference” between skip and test:retry(0) ? and have you tried the - that has been introduced to Robot to “remove” tags from a test? like -test:retry(1) ?

  1. With [Tags] test:retry(0)

In that case test will contain 2 tags test:retry(1) and test:retry(0) however at line https://github.com/MarketSquare/robotframework-retryfailed/blob/main/src/RetryFailed/retry_failed.py#L48 there might be issues since the tags are iterated, and they might not be in the correct order.

  1. With [Tags] -test:retry(1)

This works fine until you change your global retry value. For example, if you update your retry value from 1 to 2 or 3 in the command line, then it won't work..

robot -d results --listener **RetryFailed:3** atest/02_SuiteWithSkipRetryTest.robot

  1. With [Tags] test:skipretry

This solves all the above problems, and the naming clearly indicates what this tag will do.

@MummanaSubramanya
Copy link
Author

@Snooz82 Hi did you got a chance to look at this PR?

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

Successfully merging this pull request may close these issues.

2 participants