Repository navigation
Description
Current behavior 🐛
Four defects in the Hot Reload runtime tests. Split out of #24111 so the Hot Reload work can be reviewed on its own.
1. Given_HotReloadResilience asserts on page content that does not exist.
Both tests drive HR_Frame_Pages_Page1 by replacing the string "Hello", and When_HotReload_Succeeds_Then_ReloadCompleted_ReportsSuccess then asserts on a TextBlock named tb1. The page contains neither:
<TextBlock Text="First page" x:Name="FirstPageTextBlock" />
<TextBlock Text="{Binding TitleText}" />grep -rn "tb1" src/Uno.UI.RuntimeTests/Tests/HotReload/ returns only the two lines of the assertion itself, and the page has zero occurrences of "Hello". So the edit matches nothing, no hot reload occurs, and the callback asserts on an element that was never there.
This is the failure behind the red Tests - Desktop Skia Windows stage. Build 228363 reports:
Assert.Fail failed. Tests failed:
Test When_HotReload_Succeeds_Then_ReloadCompleted_ReportsSuccess() failed with
Assert.IsNotNull failed. 'value' expression: 'tb'. TextBlock 'tb1' should exist in the page
It has been latent since the tests were introduced (2026-04-07) because of defect 3 below.
2. A file edit that matches nothing is applied as a silent no-op.
HotReloadHelper.UpdateServerFile sends originalText/replacementText to the DevServer, which performs the replacement. Nothing verifies originalText is actually present, so a stale search string produces no file change, no reload, and a test that proceeds to assert against content it never updated. That is precisely what hid defect 1.
3. Given_HotReloadWorkspace.When_HotReloadScenario can pass without running anything.
The outer test strips itself from the filter it forwards to the spawned HRApp by comparing against the bare identifiers. On a CI retry the filter is rebuilt from the published failed-tests list, which carries fully qualified names, so …Given_HotReloadWorkspace.When_HotReloadScenario is forwarded to an app that has no such test. The HRApp runs zero tests, the result set is empty, and the outer test reports success because there are no failures to collect.
4. Given_ClientHotReloadProcessor.When_GetRuntimeTargetFramework_Then_PlatformMatchesRuntimeIdentifier is deterministically wrong on CoreCLR-on-Android.
The RID mapping falls through to "skia" for any unrecognised runtime identifier. The CoreCLR-on-Android host never sets RUNTIME_IDENTIFIER, so RuntimeInformation.RuntimeIdentifier reports unknown, the test expects skia, and the product correctly reports android. It has failed on 100% of android-skia-coreclr runs since 2026-07-21 — deterministic, not flaky. The existing [PlatformCondition(Exclude, SkiaAndroid)] workaround is also over-broad: SkiaAndroid covers the Mono head too, where the test passes, so it removes working coverage.
Expected behavior 🎯
The Hot Reload tests exercise content that exists, a filter mismatch or a no-op edit fails loudly instead of reporting success, and the RID cross-check only runs where a RID was actually stamped.
How to reproduce it (as minimally and precisely as possible) 🔬
Defects 1–3: run the Tests - Desktop Skia Windows stage on feature/breakingchanges; observed on builds 227595, 227658, 227685, 227738 and 228363.
Defect 4: any android-skia-coreclr run since 2026-07-21.
Workaround 🛠️
None — 1 and 4 fail deterministically; 2 and 3 mask failures rather than cause them.
Renderer 🎨
- Skia
- Native
Affected platforms 📱💻🖥️
All platforms 🌍 — runtime tests only. Observed on Desktop (Windows) and Android.
Uno.Sdk version (and other relevant versions) 📦
feature/breakingchanges (7.0 development).
IDE version 🧑💻
N/A — runtime tests.
Anything else we need to know? 💬
Defects 1 and 3 compound: 3 means the CI retry pass runs nothing, which is why 1 never surfaced. Fixing 3 alone therefore makes Tests - Desktop Skia Windows more red, honestly, until 1 is fixed too — they belong in the same change.
Split out of #24111, which keeps the two non-Hot-Reload defects (macOS native element handle, unbounded test bodies).
Activity