Skip to content

Commit 20b096f

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 0d5da57 commit 20b096f

59 files changed

Lines changed: 2082 additions & 1908 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
@@ -199,3 +199,5 @@ FLExInstaller/wix6/cabcache/*
199199

200200
# Verify snapshot testing - received files are transient
201201
*.received.png
202+
*.diff.png
203+
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: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ function Test-Dependency {
6464
[string]$Required = "Required"
6565
)
6666

67+
$isRequired = ($Required -eq "Required")
68+
6769
try {
6870
$result = & $Check
6971
if ($result) {
@@ -80,8 +82,8 @@ function Test-Dependency {
8082
}
8183
}
8284
catch {
83-
$color = if ($Required -eq "Required") { "Red" } else { "Yellow" }
84-
$status = if ($Required -eq "Required") { "[FAIL]" } else { "[WARN]" }
85+
$color = if ($isRequired) { "Red" } else { "Yellow" }
86+
$status = if ($isRequired) { "[FAIL]" } else { "[WARN]" }
8587
Write-Host "$status $Name" -ForegroundColor $color
8688
Write-Host " $_" -ForegroundColor DarkGray
8789
return @{ Name = $Name; Found = $false; IsRequired = ($Required -eq "Required"); Error = $_.ToString() }
@@ -297,9 +299,9 @@ if ($Detailed) {
297299
Write-Host "=== Summary ===" -ForegroundColor Cyan
298300
}
299301

300-
$required = $results | Where-Object { $_.IsRequired -ne $false }
301-
$missing = $required | Where-Object { -not $_.Found }
302-
$optional = $results | Where-Object { $_.IsRequired -eq $false }
302+
$required = @($results | Where-Object { $_.IsRequired -ne $false })
303+
$missing = @($required | Where-Object { -not $_.Found })
304+
$optional = @($results | Where-Object { $_.IsRequired -eq $false })
303305

304306
$totalRequired = ($required | Measure-Object).Count
305307
$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)