Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

[Android] Improve reliability of UI tests running on CI emulator #872

Merged
merged 2 commits into from
Nov 17, 2023

Conversation

jonnyandrew
Copy link
Contributor

@jonnyandrew jonnyandrew commented Nov 16, 2023

Changes

  • Add new rules to help tests pass on the Github CI emulator:
    • DismissAnrRule dismisses any 'app not responding' dialog present at the start of a test case.
    • RetryOnFailureRule retries a failed test once. This is useful if the ANR dialog appeared during the test run.
  • Add :test module containing shared test utilities

Test runs

Context

@codecov-commenter
Copy link

codecov-commenter commented Nov 16, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (97e3c85) 89.44% compared to head (14b7631) 87.28%.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #872      +/-   ##
============================================
- Coverage     89.44%   87.28%   -2.16%     
- Complexity        0      406     +406     
============================================
  Files           118      133      +15     
  Lines         16898    17355     +457     
  Branches        635      402     -233     
============================================
+ Hits          15114    15148      +34     
- Misses         1760     1937     +177     
- Partials         24      270     +246     
Flag Coverage Δ
uitests 65.58% <ø> (-13.20%) ⬇️
uitests-android 65.58% <ø> (?)
uitests-ios ?
unittests 86.64% <ø> (-1.43%) ⬇️
unittests-android 45.56% <ø> (?)
unittests-ios ?
unittests-rust 89.39% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

sonarcloud bot commented Nov 17, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@jonnyandrew jonnyandrew changed the title Dismiss ANRs in UI tests [Android] Improve reliability of UI tests running on CI emulator Nov 17, 2023
@jonnyandrew jonnyandrew requested a review from a team November 17, 2023 13:27
@jonnyandrew jonnyandrew marked this pull request as ready for review November 17, 2023 13:27
Copy link
Contributor

@jmartinesp jmartinesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congrats on fixing the issue!

@jonnyandrew jonnyandrew merged commit 628b612 into main Nov 17, 2023
8 checks passed
@jonnyandrew jonnyandrew deleted the jonny/test-dismiss-anr branch November 17, 2023 13:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Android UI tests are flaky
3 participants