Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,6 @@ Src/LexText/ParserCore/ParserCoreTests/**/*.txt -whitespace
Src/Utilities/pcpatrflex/DisambiguateInFLExDB/DisambiguateInFLExDBTests/TestData/*.* -whitespace
Src/Utilities/pcpatrflex/PcPatrBrowserDll/Transforms/*.* -whitespace
Src/Utilities/HCSynthByGloss/HCSynthByGloss/TestData/*.txt -whitespace

# Verify snapshot testing
*.verified.png binary
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ _UpgradeReport_Files/
/Release/
Output/
Output
Output/RenderBenchmarks/
Output/RenderBenchmarks/**
Output_i686/
Output_x86_64/
__pycache__/
Expand Down Expand Up @@ -186,6 +188,7 @@ CrashLog.txt
# VSTest Artifacts
TestResults/
*.trx
TestResult.xml

# WPF markup compilation temp projects
*_wpftmp.csproj
Expand All @@ -201,3 +204,8 @@ FLExInstaller/wix6/cabcache/*

# Claude Code worktrees
.claude/worktrees/*

# Verify snapshot testing - received files are transient
*.received.png
*.diff.png
DataTreeTimingBaselines.json
17 changes: 17 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,23 @@
}
],
"tasks": [
{
"label": "Test: RenderBaselineTests",
"type": "shell",
"command": ".\\test.ps1 -TestProject \"RootSiteTests\" -TestFilter \"FullyQualifiedName~RenderBaselineTests\"",
"options": {
"shell": {
"executable": "powershell.exe",
"args": ["-NoProfile", "-ExecutionPolicy", "Bypass", "-Command"]
}
},
"problemMatcher": [],
"group": "test",
"presentation": {
"reveal": "always",
"panel": "shared"
}
},
Comment thread
johnml1135 marked this conversation as resolved.
// ==================== Setup Tasks ====================
{
"label": "Setup: Colorize Worktree",
Expand Down
131 changes: 131 additions & 0 deletions Build/Agent/Run-AllRenders.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
<#
.SYNOPSIS
Runs the render-focused test suites for FieldWorks.

.DESCRIPTION
Executes the DetailControls render tests and the RootSite render tests sequentially.
This script is intentionally outside the product project graph so developers can use a
single entrypoint without introducing a meta test project into the repository architecture.

.PARAMETER Scope
Which render suites to run. Default is All.

.PARAMETER Configuration
The build configuration to test. Default is Debug.

.PARAMETER NoBuild
Skip building before running tests.

.PARAMETER Verbosity
Test output verbosity: quiet, minimal, normal, detailed.

.PARAMETER SkipDependencyCheck
Skip dependency preflight checks inside test.ps1.
#>
[CmdletBinding()]
param(
[ValidateSet('All', 'DetailControls', 'RootSite')]
[string]$Scope = 'All',
[string]$Configuration = 'Debug',
[switch]$NoBuild,
[ValidateSet('quiet', 'minimal', 'normal', 'detailed', 'q', 'm', 'n', 'd')]
[string]$Verbosity = 'normal',
[switch]$SkipDependencyCheck
)

Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'

$repoRoot = [System.IO.Path]::GetFullPath((Join-Path $PSScriptRoot '..\..'))
$buildScript = Join-Path $repoRoot 'build.ps1'
$testScript = Join-Path $repoRoot 'test.ps1'

if (-not (Test-Path $buildScript)) {
throw "build.ps1 not found at $buildScript"
}

if (-not (Test-Path $testScript)) {
throw "test.ps1 not found at $testScript"
}

$requestedScopes = switch ($Scope) {
'All' { @('DetailControls', 'RootSite') }
default { @($Scope) }
}

function Invoke-RenderSuite {
param(
[Parameter(Mandatory = $true)]
[string]$Name,
[Parameter(Mandatory = $true)]
[string]$BuildProject,
[Parameter(Mandatory = $true)]
[string]$TestProject,
[Parameter(Mandatory = $true)]
[string[]]$TestFilters
)

if (-not $NoBuild) {
Write-Output "Building $Name render tests..."

$buildArgs = @{
Configuration = $Configuration
Project = $BuildProject
Verbosity = $Verbosity
}

if ($SkipDependencyCheck) {
$buildArgs['SkipDependencyCheck'] = $true
}

& $buildScript @buildArgs
if ($LASTEXITCODE -ne 0) {
throw "$Name render build failed with exit code $LASTEXITCODE."
}
}

foreach ($testFilter in $TestFilters) {
Write-Output "Running $Name render tests with filter '$testFilter'..."

$testArgs = @{
Configuration = $Configuration
TestProject = $TestProject
TestFilter = $testFilter
Verbosity = $Verbosity
NoBuild = $true
SkipDependencyCheck = $true
}

& $testScript @testArgs
if ($LASTEXITCODE -ne 0) {
throw "$Name render tests failed with exit code $LASTEXITCODE for filter '$testFilter'."
}
}

Write-Output "[OK] $Name render tests passed."
}

foreach ($requestedScope in $requestedScopes) {
switch ($requestedScope) {
'DetailControls' {
Invoke-RenderSuite `
-Name 'DetailControls' `
-BuildProject 'Src/Common/Controls/DetailControls/DetailControlsTests/DetailControlsTests.csproj' `
-TestProject 'Src/Common/Controls/DetailControls/DetailControlsTests' `
-TestFilters 'FullyQualifiedName~DataTreeRenderTests'
}
'RootSite' {
Invoke-RenderSuite `
-Name 'RootSite' `
-BuildProject 'Src/Common/RootSite/RootSiteTests/RootSiteTests.csproj' `
-TestProject 'Src/Common/RootSite/RootSiteTests' `
-TestFilters @(
'FullyQualifiedName~RenderBaselineTests',
'FullyQualifiedName~RenderTimingSuiteTests',
'FullyQualifiedName~RenderVerifyTests'
)
}
}
}

Write-Output 'All requested render suites passed.'
16 changes: 16 additions & 0 deletions FieldWorks.sln
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DetailControls", "Src\Commo
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DetailControlsTests", "Src\Common\Controls\DetailControls\DetailControlsTests\DetailControlsTests.csproj", "{36F2A7A6-C7F9-5D3D-87D7-B4C0D5C51C0E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RenderTestInfrastructure", "Src\Common\RenderTestInfrastructure\RenderTestInfrastructure.csproj", "{B53C715F-2F97-4E2B-9C10-5BFF1C04A446}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RenderVerification", "Src\Common\RenderVerification\RenderVerification.csproj", "{6F7A4D9C-5B44-4D0E-ABAA-8D6F38F30C6A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Discourse", "Src\LexText\Discourse\Discourse.csproj", "{A51BAFC3-1649-584D-8D25-101884EE9EAA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DiscourseTests", "Src\LexText\Discourse\DiscourseTests\DiscourseTests.csproj", "{1CE6483D-5D10-51AD-B2A7-FD7F82CCBAB2}"
Expand Down Expand Up @@ -335,6 +339,18 @@ Global
{36F2A7A6-C7F9-5D3D-87D7-B4C0D5C51C0E}.Debug|x64.Build.0 = Debug|x64
{36F2A7A6-C7F9-5D3D-87D7-B4C0D5C51C0E}.Release|x64.ActiveCfg = Release|x64
{36F2A7A6-C7F9-5D3D-87D7-B4C0D5C51C0E}.Release|x64.Build.0 = Release|x64
{B53C715F-2F97-4E2B-9C10-5BFF1C04A446}.Bounds|x64.ActiveCfg = Release|x64
{B53C715F-2F97-4E2B-9C10-5BFF1C04A446}.Bounds|x64.Build.0 = Release|x64
{B53C715F-2F97-4E2B-9C10-5BFF1C04A446}.Debug|x64.ActiveCfg = Debug|x64
{B53C715F-2F97-4E2B-9C10-5BFF1C04A446}.Debug|x64.Build.0 = Debug|x64
{B53C715F-2F97-4E2B-9C10-5BFF1C04A446}.Release|x64.ActiveCfg = Release|x64
{B53C715F-2F97-4E2B-9C10-5BFF1C04A446}.Release|x64.Build.0 = Release|x64
{6F7A4D9C-5B44-4D0E-ABAA-8D6F38F30C6A}.Bounds|x64.ActiveCfg = Release|x64
{6F7A4D9C-5B44-4D0E-ABAA-8D6F38F30C6A}.Bounds|x64.Build.0 = Release|x64
{6F7A4D9C-5B44-4D0E-ABAA-8D6F38F30C6A}.Debug|x64.ActiveCfg = Debug|x64
{6F7A4D9C-5B44-4D0E-ABAA-8D6F38F30C6A}.Debug|x64.Build.0 = Debug|x64
{6F7A4D9C-5B44-4D0E-ABAA-8D6F38F30C6A}.Release|x64.ActiveCfg = Release|x64
{6F7A4D9C-5B44-4D0E-ABAA-8D6F38F30C6A}.Release|x64.Build.0 = Release|x64
{A51BAFC3-1649-584D-8D25-101884EE9EAA}.Bounds|x64.ActiveCfg = Release|x64
{A51BAFC3-1649-584D-8D25-101884EE9EAA}.Bounds|x64.Build.0 = Release|x64
{A51BAFC3-1649-584D-8D25-101884EE9EAA}.Debug|x64.ActiveCfg = Debug|x64
Expand Down
Loading
Loading