Skip to content

chore(samples): Repeat runtime tests from the command line - #25153

Merged
MartinZikmund merged 2 commits into
masterfrom
dev/mazi/runtime-tests-iterations
Oct 9, 2026
Merged

MartinZikmund merged 2 commits into
masterfrom
dev/mazi/runtime-tests-iterations

Conversation

@MartinZikmund

Copy link
Copy Markdown
Member

GitHub Issue: closes #25152

PR Type:

🏗️ Build or CI related changes

What changed? 🚀

The runtime-test runner's in-app UI can repeat tests and switch off retries, but headless runs (dotnet SamplesApp.dll --runtime-tests=..., the WASM URL parameters, CI scripts) always used the default: 1 iteration, up to 3 attempts. That makes a flaky test hard to measure. The silent retries hide most failures, and relaunching the app per run is slow.

  • --runtime-tests-iterations=N / UITEST_RUNTIME_TESTS_ITERATIONS: runs each test N times in a row and stops at the first failing iteration. The failure reports which iteration failed, on the console and in the test's output.
  • --runtime-tests-attempts=N / UITEST_RUNTIME_TESTS_ATTEMPTS: attempts per iteration before a failure is reported; 1 reports the first failure.
  • The runner logs the effective iterations and attempts. The /runtime-tests skill documents both options.

Defaults are unchanged, so CI behaves as before.

Validation (Skia Win32, local): used to measure Given_FlipView.When_TouchFlick_Then_FlipOneItem with 60 iterations, 1 attempt and the process pinned to one core. Master failed at iterations 2, 4, 4 and 9, while 6 regular headless launches (3 attempts each) had all passed. The log shows Running each test 60 time(s), with up to 1 attempt(s) per iteration and ...: Failed on iteration 4 of 60.

PR Checklist ✅

🤖 Generated with Claude Code

https://claude.ai/code/session_01Usdq5JJfVkzKcYtwkKCRUy

MartinZikmund and others added 2 commits October 9, 2026 13:42
--runtime-tests-iterations / UITEST_RUNTIME_TESTS_ITERATIONS runs each test
N times (stopping at the first failing iteration, which is reported), and
--runtime-tests-attempts / UITEST_RUNTIME_TESTS_ATTEMPTS sets the attempts
per iteration, so a flaky test can be measured within one launch with the
built-in retries off. Both were only reachable from the runner's UI.

Refs #25152

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Usdq5JJfVkzKcYtwkKCRUy
Copilot AI balanced review requested due to automatic review settings October 9, 2026 11:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot added area/automation Categorizes an issue or PR as relevant to project automation kind/documentation labels Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 24s —— View job


Review summary

Verdict: ship after one small fix. The change is small, defaults are unchanged, and the iteration/attempt wiring in UnitTestsControl.cs matches the existing loop logic (it stops at the first failing iteration, and a null console is handled by string concatenation).

Issue (minor): src/SamplesApp/SamplesApp/Platforms/Android/MainActivity.Android.cs:55 has a knownVariables allowlist for intent extras. It doesn't include UITEST_RUNTIME_TESTS_ITERATIONS or UITEST_RUNTIME_TESTS_ATTEMPTS, so on Android the new options are silently ignored. Add both next to UITEST_RUNTIME_TESTS_FILTER. I couldn't post this as an inline comment because that file isn't part of the PR diff.

Not verified: the skill doc says that on WASM the options are passed as URL query parameters. I didn't find where those are mapped to the env vars, so please confirm it works.

Testing: the PR checklist has no new runtime test. That's reasonable for runner tooling. The Skia validation described in the PR body is the only evidence, and I did not run it here.

@unodevops

Copy link
Copy Markdown
Contributor

@MartinZikmund
MartinZikmund merged commit b1d9e43 into master Oct 9, 2026
52 checks passed
@MartinZikmund
MartinZikmund deleted the dev/mazi/runtime-tests-iterations branch October 9, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/automation Categorizes an issue or PR as relevant to project automation kind/documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Runtime tests: repeat tests and set retries from the command line

3 participants