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

Test retry #522

Merged
merged 3 commits into from
Mar 18, 2019
Merged

Test retry #522

merged 3 commits into from
Mar 18, 2019

Conversation

bootstraponline
Copy link
Contributor

@bootstraponline bootstraponline commented Mar 15, 2019

Fix #456

Read in JUnitReport.xml and remove duplicate results when flaky-test-attempts is > 0. For each test keep first result. If next result for the same test is successful, keep last successful result.

@codecov-io
Copy link

codecov-io commented Mar 15, 2019

Codecov Report

Merging #522 into master will decrease coverage by 0.62%.
The diff coverage is 42.85%.

Impacted file tree graph

@@             Coverage Diff             @@
##             master    #522      +/-   ##
===========================================
- Coverage     80.33%   79.7%   -0.63%     
- Complexity      639     653      +14     
===========================================
  Files            74      75       +1     
  Lines          2029    2060      +31     
  Branches        259     273      +14     
===========================================
+ Hits           1630    1642      +12     
- Misses          251     258       +7     
- Partials        148     160      +12

@gtroshin
Copy link

Is there information about the same tests (with the same name) in JUnitReport.xml been run on different devices and how does it handled if for some device they failed for some all passed?

@bootstraponline
Copy link
Contributor Author

Is there information about the same tests (with the same name) in JUnitReport.xml been run on different devices and how does it handled if for some device they failed for some all passed?

That's a good point. I'll push a fix for multi-device.

@valeraz
Copy link
Contributor

valeraz commented Mar 15, 2019

From a quick look, this approach would probably break legitimate cases of duplicate test results in the final rollup (e.g. the use of repeatShards, unless you want to not allow the use of repeatShards with flakyTestAttempts). Deduping at the shard/device level seems like a safer approach.

@bootstraponline
Copy link
Contributor Author

I pushed a new commit that names JUnitTestSuite after the device string (NexusLowRes-28-en-portrait). That should resolve concerns around the same tests being deduplicated across multiple devices.

@bootstraponline
Copy link
Contributor Author

unless you want to not allow the use of repeatShards with flakyTestAttempts

I think you can use repeatShards with flakyTestAttempts, however flakyTestAttempts will activate deduplication. I agree about device level dedupe, that should work now.

@gtroshin
Copy link

I have a suite with several flaky tests and that new implementation showed it well! Everything is green.
Will you keep it in snapshot until the release or there are any plans to unmerge it?

@bootstraponline bootstraponline merged commit b27238e into master Mar 18, 2019
@bootstraponline
Copy link
Contributor Author

Will you keep it in snapshot until the release or there are any plans to unmerge it?

I merged the PR. It'll continue to be in the snapshots. Thanks for testing!

@bootstraponline bootstraponline deleted the test_retry branch March 18, 2019 14:44
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.

4 participants