Skip to content

Add Android device tests with bundled ICU 72#230

Draft
hahn-kev wants to merge 17 commits into
masterfrom
feature/android-device-tests
Draft

Add Android device tests with bundled ICU 72#230
hahn-kev wants to merge 17 commits into
masterfrom
feature/android-device-tests

Conversation

@hahn-kev

@hahn-kev hahn-kev commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Most of this work was done by Cursor.

Runs the icu.net test suite on a physical Android device or emulator via DeviceRunners, using bundled ICU 72 instead of system ICU. All tests use NUnit — the full icu.net.tests suite plus a small android.tests assembly for platform smoke and ICU load diagnostics.

  • MAUI test app (icu.net.android.tests) — NUnit smoke tests (platform check, ICU load diagnostics) and the full NUnit suite from icu.net.tests via project reference
  • Bundled ICU loading — APK native libs, dlopen with RTLD_GLOBAL, soname symlinks, external icudt72l.dat; bootstrap lives in icu.net and runs from Wrapper.Init() on Android
  • Build scriptsbuild-icu-android.ps1, run-android-tests.ps1, probe-android-icu.ps1
  • Optional net10.0-android TFM on icu.net via IcuDotNetIncludeAndroid (off by default for the NuGet package)
  • DeviceRunners workarounds — default TRX logger for dotnet test summary; TRX rebuild from JSONL when failure output contains XML-invalid control characters

Status: Smoke/diagnostic tests pass. Full NUnit run discovers ~458 tests; many failures are expected Android/ICU gaps (BiDi, locale, Windows-only cases), not runner wiring.

Test plan:

$env:ANDROID_HOME = 'C:\path\to\android-sdk'
.\scripts\build-icu-android.ps1
.\scripts\run-android-tests.ps1 -Configuration Release

Note

I'm still considering if this is a good idea and actually the direction I want to go. It might be easier to use ICU4N for FW Lite as it seems to support what I care about.

hahn-kev and others added 10 commits July 2, 2026 15:31
Introduce a MAUI-based test host for on-device xUnit runs on Android,
with a dotnet test script and xharness tool manifest for CI/local use.

Co-authored-by: Cursor <cursoragent@cursor.com>
Remove default shell, sample UI, and non-Android targets so the
device runner project is a minimal starting point for on-device tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
Reference icu.net from the device test project and add RuleBasedCollator Compare coverage on Android. Map Android to Unix in Platform so native ICU loading follows the Unix path.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add cross-compile scripts, APK-native-library wiring, and Android-specific
loading so soname dependencies and external icudt72l.dat work under FastDev.

Co-authored-by: Cursor <cursoragent@cursor.com>
Multi-target the test project for net10.0-android, wire AddNUnit in the MAUI
host, and delegate ICU setup through Wrapper.AndroidTestConfigure.

Co-authored-by: Cursor <cursoragent@cursor.com>
DeviceRunners only writes TRX when a logger is configured; default VSTestLogger
in the test project produces the documented test summary line.

Co-authored-by: Cursor <cursoragent@cursor.com>
DeviceRunners can truncate TRX when messages contain control characters; regenerate
a sanitized test-results.trx from tcp-test-events.jsonl before dotnet test reports.

Co-authored-by: Cursor <cursoragent@cursor.com>
… TFM.

Wrapper.Init() now configures bundled ICU on Android automatically, removing the test-app setup hook.
Convert smoke and diagnostics tests to NUnit and remove duplicate collation coverage already in icu.net.tests.
Run bundled ICU build and NUnit tests on an emulator; include TRX in the test-results workflow alongside desktop NUnit XML.
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

Test Results

       8 files  ±0     648 suites  ±0   8s ⏱️ -1s
   439 tests ±0     435 ✔️ ±0      4 💤 ±0  0 ±0 
3 600 runs  ±0  3 390 ✔️ ±0  210 💤 ±0  0 ±0 

Results for commit 11c5a10. ± Comparison against base commit 3d97cb2.

♻️ This comment has been updated with latest results.

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.

1 participant