Rebalances a UI-test umbrella category into additive method-level CI shards using historical Azure DevOps test durations.
65
77%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./.github/skills/rebalance-ui-test-categories/SKILL.mdUse this skill when a category in maui-pr-uitests needs multiple ordinary
matrix legs and each leg must fit a target duration.
[ShardedTestCategory(UITestCategories.Category, shard: N)] attribute. It
exposes both the umbrella and exactly one numbered shard category to NUnit.
Never put sharded categories on a class.TargetMinutes - SafetyMarginMinutes.-MaxShards cannot
satisfy the target.Order(1) test to initialize the remaining shard.testConfigurationArgs, such as
ios_ui_tests_mono_cv1, reuse the numbered shard filters but remain outside
ordinary category-matrix projection data. Their samples and overhead are
recorded separately so they cannot make ordinary shard projections look
artificially cheaper.Gather, plan, report, and apply in one operation:
pwsh .github/skills/rebalance-ui-test-categories/scripts/Rebalance-UITestCategories.ps1 `
-Mode All -Category CollectionView -TargetMinutes 60 `
-SafetyMarginMinutes 2 -BuildId 1561395,1563447 `
-UnmeasuredTestPolicy ClassPlatformMax `
-OutputPath artifacts/CollectionView-rebalance.json -ApplyUse -RecentBuildCount N instead of -BuildId to query recent completed builds
from pipeline definition 313. To work offline, explicitly pass
-EvidencePath path/to/evidence.json; absence of Azure access or an evidence
file is an error.
Use -MinimumShards N -MaxShards N when rebalancing an existing matrix without
changing its job count.
Separate deterministic phases are also available:
# Azure -> evidence JSON
... -Mode Gather -Category CollectionView -BuildId 1563447 `
-OutputPath artifacts/CollectionView-evidence.json
# Evidence -> assignment report
... -Mode Plan -Category CollectionView `
-EvidencePath artifacts/CollectionView-evidence.json `
-OutputPath artifacts/CollectionView-plan.json
# Existing report -> source/YAML/constants
... -Mode Apply -Category CollectionView `
-PlanPath artifacts/CollectionView-plan.json -ApplyReview the JSON report's projectedShardMinutes, fixedOverheadMinutes,
safetyMarginMinutes, separately recorded configuration-stage evidence,
unmatched evidence, and source mapping before accepting the result.
The planner fails when active source tests have no historical sample. For a
known-complete historical run where such methods were not reported, the
explicit -UnmeasuredTestPolicy ClassPlatformMax option conservatively imputes
the maximum measured method duration from the same class/platform (falling
back to the platform-wide maximum) and records every imputation in the report.
7a5a5d6
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.