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

good way to record which specs have been re-tried? #102

Open
tansaku opened this issue Jul 22, 2019 · 4 comments
Open

good way to record which specs have been re-tried? #102

tansaku opened this issue Jul 22, 2019 · 4 comments

Comments

@tansaku
Copy link

tansaku commented Jul 22, 2019

I was hoping to use rspec-retry to not only automatically re-run failing tests, but to record information about which tests are failing intermittently and which are failing multiple times. Does that information get summarised anywhere?

I was thinking of using the retry_callback but that only runs in between tests, and so means it can only be used to record individual failures, and not used to indicate that a test first failed and then passed. Is there some other mechanism available?

Many thanks in advance

@shotop
Copy link

shotop commented Oct 7, 2019

Found myself here wondering about a similar strategy. Ideally the retry is never used, but when it is, it would be awesome to have some way to know which specs were retried without having to traverse through the build output. With this info, I could target the specs that were flakey. Thanks in advance for any advice and thanks for an awesome tool.

@smccarthy
Copy link

I am in a similar situation. I was using examples = RSpec.world.filtered_examples.values.flatten in my after suite hook. However, this doesn't include all the tries of a test (only the last one I think).

@rymai
Copy link

rymai commented Nov 16, 2021

For reference, we at GitLab developed such functionality: https://gitlab.com/gitlab-org/gitlab/-/blob/master/tooling/rspec_flaky/listener.rb

Maybe we could upstream it to this gem?

@megatux
Copy link

megatux commented Feb 8, 2022

There is a PR for adding a callback to do something on failure.
Our company maintain a fork with it here

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

No branches or pull requests

5 participants