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

Refactor Android smoke test #1865

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
Draft

Conversation

lucas-zimerman
Copy link
Collaborator

@lucas-zimerman lucas-zimerman commented Oct 27, 2024

Here are the main fixes implemented on the PR:

  • Added new check on smoke test to fail when the activity wasn't found.
  • Fixed wrong output variable used on the actions.
  • Fixed issue that screen capture crashes the test on Linux.
  • Migrated tests from MacOS to Ubuntu, speeding up a lot of the tests!
  • made wrapper only retry if Emulator Setup failed or app were flaky, it will not retry when the app passes the test or when the smoke test failed.

NOTE: Ideally we should use cache the emulators, but things were too flaky when caching the emulator that I opted to not cache it for the moment.

Close #1811

#skip-changelog.

@lucas-zimerman lucas-zimerman marked this pull request as ready for review October 28, 2024 00:24
@bitsandfoxes
Copy link
Contributor

Something is really broken here. The tests pass in CI but if you look at the logs you'll see

ExitNow: /Users/runner/work/sentry-unity/sentry-unity/scripts/smoke-test-android.ps1:438
Line |
 438 |              ExitNow "timeout" "$name test Timeout, see Logcat info fo …
     |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | smoke test Timeout, see Logcat info for more info.
Error: The process '/bin/sh' failed with exit code 1

and they are still timing out.

Copy link
Contributor

@bitsandfoxes bitsandfoxes left a comment

Choose a reason for hiding this comment

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

I think the fail-condition needs to be reworked. The tests should not fail and the step still succeeds.

@bruno-garcia
Copy link
Member

@lucas-zimerman could u give this another stab plz?

@lucas-zimerman
Copy link
Collaborator Author

Sorry I didn't receive the notifications for this PR :(
I will address them soon

@lucas-zimerman lucas-zimerman marked this pull request as draft November 20, 2024 19:35
@lucas-zimerman lucas-zimerman changed the title Update android-smoke-test.yml Refactor Android smoke test Nov 21, 2024
@bruno-garcia
Copy link
Member

re-requested @bitsandfoxes review since CI looks happy

@bitsandfoxes
Copy link
Contributor

re-requested @bitsandfoxes review since CI looks happy

It looks like CI is lying and in fact not happy at all. 😞

Test: 'smoke'
  Clearing logcat from emulator-5554.
  Starting app com.DefaultCompany.IntegrationTest/com.unity3d.player.UnityPlayerGameActivity
  Writing 'status=failed' to env:GITHUB_OUTPUT: /home/runner/work/_temp/_runner_file_commands/set_output_034e8b79-7988-4ec5-a926-936971dd79c6
  ExitNow: /home/runner/work/sentry-unity/sentry-unity/scripts/smoke-test-android.ps1:360
  Line |
   360 |              ExitNow "failed" "Activity does not exist"
       |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       | Activity does not exist
  Error: The process '/usr/bin/sh' failed with exit code 1

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.

Android smoketests not running
3 participants