Skip to content

Conversation

@grendello
Copy link
Contributor

@grendello grendello commented Dec 3, 2025

This pull request expands test coverage across multiple test classes to ensure all tests are executed for every supported AndroidRuntime (MonoVM, CoreCLR, NativeAOT). It does so by parameterizing tests with the AndroidRuntime enum, updating project initialization to reflect the runtime, and adding runtime-specific configuration and skip logic where necessary. This ensures that features and behaviors are validated across all runtime variants, improving reliability and future-proofing the test suite.

Key changes include:

Test Parameterization and Runtime Handling:

  • Parameterized numerous [Test] methods across AndroidResourceTests, CheckClientHandlerTypeTests, LinkerTests, ManagedResourceParserTests, and ResolveMonoAndroidSdksTests to run with all values of the AndroidRuntime enum using [Values] AndroidRuntime runtime.

  • Updated project creation in tests to set IsRelease based on the runtime (e.g., NativeAOT implies release), and called SetRuntime(runtime) on test projects to ensure correct configuration.

  • Added runtime-aware skip logic using IgnoreUnsupportedConfiguration(runtime, release: isRelease) to bypass incompatible test configurations.

Test Data and Behavior Adjustments:

  • Refactored test data sources to generate cases for all AndroidRuntime values, ensuring comprehensive coverage.

  • Adjusted test logic and assertions to handle differences in build outputs and behaviors between runtimes, particularly for NativeAOT (e.g., output directory structure, test skips for known issues).

Miscellaneous:

  • Added necessary using directives and minor code cleanups to support new logic.

These changes collectively ensure that the test suite robustly validates Xamarin.Android behavior across all supported runtime environments.

@grendello grendello force-pushed the dev/grendel/test-runtimes-11 branch from 2174803 to f6d57a2 Compare December 4, 2025 11:11
@grendello grendello marked this pull request as ready for review December 4, 2025 11:11
Copy link
Member

@jonathanpeppers jonathanpeppers left a comment

Choose a reason for hiding this comment

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

I merged in main, which should hopefully resolve the timeouts that were there before.

@grendello grendello force-pushed the dev/grendel/test-runtimes-11 branch 2 times, most recently from 67571c4 to 5f7b2c9 Compare December 9, 2025 08:44
@grendello grendello force-pushed the dev/grendel/test-runtimes-11 branch from 5f7b2c9 to bf4ee01 Compare December 9, 2025 19:42
@jonathanpeppers jonathanpeppers merged commit fbd56c1 into main Dec 10, 2025
57 of 59 checks passed
@jonathanpeppers jonathanpeppers deleted the dev/grendel/test-runtimes-11 branch December 10, 2025 22:03
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.

3 participants