Skip to content

Commit cc63c4a

Browse files
committed
perf(render): expand benchmark coverage and stabilize render test infrastructure
- add broader DataTree and RootSite render scenarios, baselines, and timing catalogs - tighten the render harness and verification infrastructure for benchmark and baseline runs - fix font/color cache behavior, refresh policies, and warm scrolling/layout follow-up cases - update native render tracing and Views support code to match the new benchmark coverage - add the agent render runner and related docs/project wiring needed for repeatable runs
1 parent 27f7879 commit cc63c4a

59 files changed

Lines changed: 2084 additions & 1910 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,3 +197,5 @@ FLExInstaller/wix6/cabcache/*
197197

198198
# Verify snapshot testing - received files are transient
199199
*.received.png
200+
*.diff.png
201+
DataTreeTimingBaselines.json

Build/Agent/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ PowerShell scripts for build, test, and CI orchestration.
1111

1212
| Script | Purpose |
1313
|--------|---------|
14+
| `Run-AllRenders.ps1` | Runs the DetailControls and RootSite render suites sequentially from one command without adding a meta test project. |
1415
| `Summarize-NativeTestResults.ps1` | Parses native Unit++ logs and appends a pass/fail summary table to GitHub step summary. |
1516

1617
## GitHub Actions usage

Build/Agent/Run-AllRenders.ps1

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
<#
2+
.SYNOPSIS
3+
Runs the render-focused test suites for FieldWorks.
4+
5+
.DESCRIPTION
6+
Executes the DetailControls render tests and the RootSite render tests sequentially.
7+
This script is intentionally outside the product project graph so developers can use a
8+
single entrypoint without introducing a meta test project into the repository architecture.
9+
10+
.PARAMETER Scope
11+
Which render suites to run. Default is All.
12+
13+
.PARAMETER Configuration
14+
The build configuration to test. Default is Debug.
15+
16+
.PARAMETER NoBuild
17+
Skip building before running tests.
18+
19+
.PARAMETER Verbosity
20+
Test output verbosity: quiet, minimal, normal, detailed.
21+
22+
.PARAMETER SkipDependencyCheck
23+
Skip dependency preflight checks inside test.ps1.
24+
#>
25+
[CmdletBinding()]
26+
param(
27+
[ValidateSet('All', 'DetailControls', 'RootSite')]
28+
[string]$Scope = 'All',
29+
[string]$Configuration = 'Debug',
30+
[switch]$NoBuild,
31+
[ValidateSet('quiet', 'minimal', 'normal', 'detailed', 'q', 'm', 'n', 'd')]
32+
[string]$Verbosity = 'normal',
33+
[switch]$SkipDependencyCheck
34+
)
35+
36+
Set-StrictMode -Version Latest
37+
$ErrorActionPreference = 'Stop'
38+
39+
$repoRoot = [System.IO.Path]::GetFullPath((Join-Path $PSScriptRoot '..\..'))
40+
$buildScript = Join-Path $repoRoot 'build.ps1'
41+
$testScript = Join-Path $repoRoot 'test.ps1'
42+
43+
if (-not (Test-Path $buildScript)) {
44+
throw "build.ps1 not found at $buildScript"
45+
}
46+
47+
if (-not (Test-Path $testScript)) {
48+
throw "test.ps1 not found at $testScript"
49+
}
50+
51+
$requestedScopes = switch ($Scope) {
52+
'All' { @('DetailControls', 'RootSite') }
53+
default { @($Scope) }
54+
}
55+
56+
function Invoke-RenderSuite {
57+
param(
58+
[Parameter(Mandatory = $true)]
59+
[string]$Name,
60+
[Parameter(Mandatory = $true)]
61+
[string]$BuildProject,
62+
[Parameter(Mandatory = $true)]
63+
[string]$TestProject,
64+
[Parameter(Mandatory = $true)]
65+
[string[]]$TestFilters
66+
)
67+
68+
if (-not $NoBuild) {
69+
Write-Output "Building $Name render tests..."
70+
71+
$buildArgs = @{
72+
Configuration = $Configuration
73+
Project = $BuildProject
74+
Verbosity = $Verbosity
75+
}
76+
77+
if ($SkipDependencyCheck) {
78+
$buildArgs['SkipDependencyCheck'] = $true
79+
}
80+
81+
& $buildScript @buildArgs
82+
if ($LASTEXITCODE -ne 0) {
83+
throw "$Name render build failed with exit code $LASTEXITCODE."
84+
}
85+
}
86+
87+
foreach ($testFilter in $TestFilters) {
88+
Write-Output "Running $Name render tests with filter '$testFilter'..."
89+
90+
$testArgs = @{
91+
Configuration = $Configuration
92+
TestProject = $TestProject
93+
TestFilter = $testFilter
94+
Verbosity = $Verbosity
95+
NoBuild = $true
96+
SkipDependencyCheck = $true
97+
}
98+
99+
& $testScript @testArgs
100+
if ($LASTEXITCODE -ne 0) {
101+
throw "$Name render tests failed with exit code $LASTEXITCODE for filter '$testFilter'."
102+
}
103+
}
104+
105+
Write-Output "[OK] $Name render tests passed."
106+
}
107+
108+
foreach ($requestedScope in $requestedScopes) {
109+
switch ($requestedScope) {
110+
'DetailControls' {
111+
Invoke-RenderSuite `
112+
-Name 'DetailControls' `
113+
-BuildProject 'Src/Common/Controls/DetailControls/DetailControlsTests/DetailControlsTests.csproj' `
114+
-TestProject 'Src/Common/Controls/DetailControls/DetailControlsTests' `
115+
-TestFilters 'FullyQualifiedName~DataTreeRenderTests'
116+
}
117+
'RootSite' {
118+
Invoke-RenderSuite `
119+
-Name 'RootSite' `
120+
-BuildProject 'Src/Common/RootSite/RootSiteTests/RootSiteTests.csproj' `
121+
-TestProject 'Src/Common/RootSite/RootSiteTests' `
122+
-TestFilters @(
123+
'FullyQualifiedName~RenderBaselineTests',
124+
'FullyQualifiedName~RenderTimingSuiteTests',
125+
'FullyQualifiedName~RenderVerifyTests'
126+
)
127+
}
128+
}
129+
}
130+
131+
Write-Output 'All requested render suites passed.'

Build/Agent/Verify-FwDependencies.ps1

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,25 +49,27 @@ function Test-Dependency {
4949
[string]$Required = "Required"
5050
)
5151

52+
$isRequired = ($Required -eq "Required")
53+
5254
try {
5355
$result = & $Check
5456
if ($result) {
5557
Write-Host "[OK] $Name" -ForegroundColor Green
5658
if ($result -is [string] -and $result.Length -gt 0 -and $result.Length -lt 100) {
5759
Write-Host " $result" -ForegroundColor DarkGray
5860
}
59-
return @{ Name = $Name; Found = $true; Info = $result }
61+
return @{ Name = $Name; Found = $true; Required = $isRequired; Info = $result }
6062
}
6163
else {
6264
throw "Check returned null/false"
6365
}
6466
}
6567
catch {
66-
$color = if ($Required -eq "Required") { "Red" } else { "Yellow" }
67-
$status = if ($Required -eq "Required") { "[FAIL]" } else { "[WARN]" }
68+
$color = if ($isRequired) { "Red" } else { "Yellow" }
69+
$status = if ($isRequired) { "[FAIL]" } else { "[WARN]" }
6870
Write-Host "$status $Name" -ForegroundColor $color
6971
Write-Host " $_" -ForegroundColor DarkGray
70-
return @{ Name = $Name; Found = $false; Required = ($Required -eq "Required"); Error = $_.ToString() }
72+
return @{ Name = $Name; Found = $false; Required = $isRequired; Error = $_.ToString() }
7173
}
7274
}
7375

@@ -268,9 +270,9 @@ if ($IncludeOptional) {
268270
Write-Host ""
269271
Write-Host "=== Summary ===" -ForegroundColor Cyan
270272

271-
$required = $results | Where-Object { $_.Required -ne $false }
272-
$missing = $required | Where-Object { -not $_.Found }
273-
$optional = $results | Where-Object { $_.Required -eq $false }
273+
$required = @($results | Where-Object { $_.Required -ne $false })
274+
$missing = @($required | Where-Object { -not $_.Found })
275+
$optional = @($results | Where-Object { $_.Required -eq $false })
274276

275277
$totalRequired = ($required | Measure-Object).Count
276278
$foundRequired = ($required | Where-Object { $_.Found } | Measure-Object).Count

Directory.Packages.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@
153153
<PackageVersion Include="NUnit3TestAdapter" Version="4.6.0" />
154154
<PackageVersion Include="NUnitForms" Version="1.3.1" />
155155
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
156+
<!-- Can be changed to NUnit.Verify when NUnit is updated to v4 -->
156157
<PackageVersion Include="Verify" Version="31.11.0" />
157158
</ItemGroup>
158159
</Project>

0 commit comments

Comments
 (0)