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

[Android] Take a screenshot when instrumentation tests fail #871

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

jonnyandrew
Copy link
Contributor

@jonnyandrew jonnyandrew commented Nov 16, 2023

Changes

Take a screenshot when the core library UI tests fail.

An example of the output can be found in the CI artifacts for 04b84f5.

Context

To aid debugging of test failures.

@codecov-commenter
Copy link

codecov-commenter commented Nov 16, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (59d2a99) 89.40% compared to head (04b84f5) 89.39%.
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #871      +/-   ##
==========================================
- Coverage   89.40%   89.39%   -0.02%     
==========================================
  Files         118       86      -32     
  Lines       16845    15324    -1521     
  Branches      635        0     -635     
==========================================
- Hits        15061    13699    -1362     
+ Misses       1760     1625     -135     
+ Partials       24        0      -24     
Flag Coverage Δ
uitests ?
uitests-ios ?
unittests 89.39% <ø> (+1.38%) ⬆️
unittests-ios ?
unittests-rust 89.39% <ø> (+0.03%) ⬆️

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.

@jonnyandrew jonnyandrew marked this pull request as ready for review November 16, 2023 16:36
@jmartinesp
Copy link
Contributor

Nice, it seems like we can get the cause of the issue now! Maybe we can automate closing that dialog? I'm pretty sure I saw something similar in some issue a long time ago.

@jmartinesp
Copy link
Contributor

Maybe this? They also recommend using non-google-api versions if possible.

@jonnyandrew
Copy link
Contributor Author

Maybe this? They also recommend using non-google-api versions if possible.

Yeah this would be handy but the API is deprecated from API 31 so I don't think we can use that.

I was going to try to see if we can use UiAutomator to dismiss the dialog because I see a few other projects doing this.

@jonnyandrew
Copy link
Contributor Author

@jmartinesp am I OK to merge this change so that it's not blocked by the eventual fix?

@jmartinesp
Copy link
Contributor

Oh, sure. I thought you wanted to apply the fix in this PR, that's why I hadn't approved yet.

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 merged commit 97e3c85 into main Nov 17, 2023
9 of 10 checks passed
@jonnyandrew jonnyandrew deleted the jonny/test-screenshot branch November 17, 2023 09:58
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.

3 participants