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

Automated way to report flaky test #5227

Closed
anasalkouz opened this issue Nov 12, 2022 · 6 comments
Closed

Automated way to report flaky test #5227

anasalkouz opened this issue Nov 12, 2022 · 6 comments
Labels
enhancement Enhancement or improvement to existing feature or request flaky-test Random test failure that succeeds on second run

Comments

@anasalkouz
Copy link
Member

anasalkouz commented Nov 12, 2022

Is your feature request related to a problem? Please describe.
Currently, Developers are reporting flaky test issue while working on submitting PRs and testing features.

Describe the solution you'd like
Having an automated way to detect flaky failed tests on gradle check, then report this on github issues.

@anasalkouz anasalkouz added enhancement Enhancement or improvement to existing feature or request untriaged flaky-test Random test failure that succeeds on second run and removed untriaged labels Nov 12, 2022
@anasalkouz anasalkouz changed the title Automatic way to report flaky test Automated way to report flaky test Nov 12, 2022
@andrross
Copy link
Member

re: detecting flaky tests

The test-retry plugin shows examples of reporting flaky tests: https://github.com/gradle/test-retry-gradle-plugin#gradle-enterprise

Assuming we get retries working properly (#5239) then flaky tests will have both a failed and a passed outcome in the test report. If we could surface flaky tests directly into the PR (probably in the post where the test outcome is shown) it would be a great help for identifying flaky tests.

@dblock
Copy link
Member

dblock commented Nov 15, 2022

@andrross I had put up #5200 but it was a hacky-ish way to do it; want to attempt something cleaner?

@andrross
Copy link
Member

andrross commented Dec 5, 2022

Now that we have implemented #5200, I believe the flaky test reporting is working well on PRs. Authors and reviews are notified about flaky tests in a very obvious way and folks are creating issues to track flakiness where appropriate. We could potentially implement more automation here, but I'm curious if that is worth the investment?

However, I think we still potentially have a gap where we're not taking any action on failures are instability in the gradle check that runs after the code is pushed (the gradle-check github action runs on both PRs and push events). Recent commits show that we have pretty good reliability here now (with retries preventing one-off flaky test failures from failing the build). I propose that we add a step here to automatically create an issue (and potentially assign/notify the author and maintainer that merged the commit) any time there is a failure. This would quickly surface build failures in case broken code is committed, and prevent hard-to-reproduce failures from going unnoticed.

@dblock
Copy link
Member

dblock commented Dec 6, 2022

+1 @andrross for an [AUTOCUT] issue

@mch2
Copy link
Member

mch2 commented Jan 23, 2023

related - #5799, #5979

@mch2
Copy link
Member

mch2 commented Jan 24, 2023

Just merged #5979 to autocut after a check fails post-merge. If there is anything else we see missing related to this issue please feel free to re-open.

@mch2 mch2 closed this as completed Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or improvement to existing feature or request flaky-test Random test failure that succeeds on second run
Projects
None yet
Development

No branches or pull requests

4 participants