Skip to content

iOS & Android integration tests - #4559

Merged
jpnurmi merged 58 commits into
mainfrom
test/ios-integration
Oct 7, 2025
Merged

jpnurmi merged 58 commits into
mainfrom
test/ios-integration

Conversation

@jpnurmi

@jpnurmi jpnurmi commented Sep 24, 2025 •

Copy link
Copy Markdown
Collaborator

Helps verify that crash events are captured as expected after Cocoa and Java SDK updates (and eventually getsentry/sentry-cocoa#6193):

  • CrashType.Managed
  • CrashType.Native
  • NullReferenceException

For example, see

  • 51240026268 (iOS Device Tests -> Run Integration Tests)
  • 51593510741 (Android Device Tests -> Run Integration Tests)

#skip-changelog


Note

Adds MAUI-based Android and iOS integration tests executed on emulators/simulators in CI, with supporting test app, utilities, and workflow updates (including retries and result artifacts).

  • CI/Workflows:
    • Android: run new integration tests on emulator via integration-test/android.Tests.ps1 with retry; checkout submodules; set up Java 17; fetch shared github-workflows; reuse emulator config via YAML anchors; upload both test_output and integration-test/mobile-app/test_output.
    • iOS: add integration tests via integration-test/ios.Tests.ps1 with retry; upload both result paths.
    • Build: include scripts in sparse checkout for publishing builds.
  • Tests/Infrastructure:
    • Add MAUI test app (integration-test/net9-maui/**) targeting net9.0-android35.0 and net9.0-ios18.0 to drive crash scenarios and verify envelopes.
    • New Pester test suites: integration-test/android.Tests.ps1, integration-test/ios.Tests.ps1; shared helpers in integration-test/pester.ps1.
    • Utilities: new scripts/device-test-utils.ps1 (XHarness install, emulator/simulator helpers); scripts/device-test.ps1 now uses these helpers and simplifies simulator selection.
    • Refactor integration-test/common.ps1 to source shared Pester extensions.

Written by Cursor Bugbot for commit 8144e87. This will update automatically on new commits. Configure here.

@codecov

codecov Bot commented Sep 24, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.46%. Comparing base (b3d9b2f) to head (fed73a4).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4559      +/-   ##
==========================================
- Coverage   73.50%   73.46%   -0.04%     
==========================================
  Files         482      482              
  Lines       17678    17678              
  Branches     3493     3493              
==========================================
- Hits        12994    12988       -6     
- Misses       3796     3800       +4     
- Partials      888      890       +2     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jpnurmi

jpnurmi commented Sep 25, 2025 •

Copy link
Copy Markdown
Collaborator Author

@sentry review

@jpnurmi
jpnurmi marked this pull request as ready for review October 6, 2025 08:46
cursor[bot]

This comment was marked as outdated.

Co-authored-by: Stefan Pölz <38893694+Flash0ver@users.noreply.github.com>
cursor[bot]

This comment was marked as outdated.

# by Android Device Tests, or manually when testing locally. This avoids
# slowing down non-Device Test CI builds further.
Install-XHarness
$script:emulator = Get-AndroidEmulatorId

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

TIL about $script scoped variables in PWSH!

Comment thread integration-test/android.Tests.ps1 Resolved

@jamescrosswell jamescrosswell left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Left one non-blocking suggestion, but otherwise LGTM 🎉

cursor[bot]

This comment was marked as outdated.

Technically, less correct but doesn't fail even if port forwarding had
failed. This way, we can keep it simple and don't need to track it
separately.
@jpnurmi

jpnurmi commented Oct 7, 2025

Copy link
Copy Markdown
Collaborator Author

Thanks for testing and helping!

@jpnurmi
jpnurmi merged commit e58a8f1 into main Oct 7, 2025
32 checks passed
@jpnurmi
jpnurmi deleted the test/ios-integration branch October 7, 2025 11:13
alexsohn1126 pushed a commit that referenced this pull request Oct 11, 2025
Co-authored-by: Stefan Pölz <38893694+Flash0ver@users.noreply.github.com>
Co-authored-by: James Crosswell <jamescrosswell@users.noreply.github.com>
ric-oliv added a commit that referenced this pull request Oct 27, 2026
Each Android emulator job ran the device tests, then Setup Environment,
then the integration tests, about 22 minutes after waiting 7.5 for the
device test app builds. The integration tests build their own app from
source and share only the emulator, so they now run in a second job
that starts with the workflow, on the same runners.

The new job drops "Select Java 21". #4559 added it as "Select Java
17", when Setup Environment ended on Java 11, and since #5060 Setup
Environment installs only Java 21.

The new job uploads integration-test/mobile-app/test_output, where
android.Tests.ps1 points xharness, without a warning when it's empty.
It was empty on every run so far.

On its first run, the Android workflow took 19.8 minutes instead of
30.1. The device test jobs took 3.6 to 3.8 minutes and the integration
jobs 12.0 to 19.7.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ric-oliv added a commit that referenced this pull request Oct 27, 2026
Each Android emulator job ran the device tests, then Setup Environment,
then the integration tests, about 22 minutes after waiting 7.5 for the
device test app builds. The integration tests build their own app from
source and share only the emulator, so they now run in a second job
that starts with the workflow, on the same runners.

The new job drops "Select Java 21". #4559 added it as "Select Java
17", when Setup Environment ended on Java 11, and since #5060 Setup
Environment installs only Java 21.

The new job uploads integration-test/mobile-app/test_output, where
android.Tests.ps1 points xharness, without a warning when it's empty.
It was empty on every run so far.

On its first run, the Android workflow took 19.8 minutes instead of
30.1. The device test jobs took 3.6 to 3.8 minutes and the integration
jobs 12.0 to 19.7.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ric-oliv added a commit that referenced this pull request Oct 27, 2026
* ci: run the iOS integration tests in their own job

The iOS job ran the device tests and then the integration tests on one
Mac, about 42 minutes in all. The two build and run different apps and
share only the simulator, so the integration tests now run in a second
job at the same time.

ios.Tests.ps1 skips every case unless a simulator is already booted,
and xharness only boots one in the ios-tests job, so the new job boots
its own, with a 10-minute timeout. The boot takes about 2 minutes.
The job uploads no results, because ios.Tests.ps1 writes nothing to
the integration-test/mobile-app/test_output folder the old job
uploaded.

On its first run, the iOS workflow took 18 minutes, against 38.7 for
the single job the same night, and all 8 integration cases passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci: run the Android integration tests in their own job

Each Android emulator job ran the device tests, then Setup Environment,
then the integration tests, about 22 minutes after waiting 7.5 for the
device test app builds. The integration tests build their own app from
source and share only the emulator, so they now run in a second job
that starts with the workflow, on the same runners.

The new job drops "Select Java 21". #4559 added it as "Select Java
17", when Setup Environment ended on Java 11, and since #5060 Setup
Environment installs only Java 21.

The new job uploads integration-test/mobile-app/test_output, where
android.Tests.ps1 points xharness, without a warning when it's empty.
It was empty on every run so far.

On its first run, the Android workflow took 19.8 minutes instead of
30.1. The device test jobs took 3.6 to 3.8 minutes and the integration
jobs 12.0 to 19.7.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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