From 4b4c53474f5275ec10dfcb9c9d722a1807cf6c5e Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Mon, 3 Mar 2025 11:06:10 +0100 Subject: [PATCH 01/54] =?UTF-8?q?=F0=9F=AA=B2=20[Enhancement]:=20Improve?= =?UTF-8?q?=20test=20results=20processing=20and=20logging=20in=20main.ps1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/main.ps1 | 43 +++++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index e12c92a..0442173 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -3,19 +3,38 @@ [CmdletBinding()] param() -begin { - $scriptName = $MyInvocation.MyCommand.Name - Write-Debug "[$scriptName] - Start" -} +$PSStyle.OutputRendering = 'Ansi' +$repo = $env:GITHUB_REPOSITORY +$runId = $env:GITHUB_RUN_ID +gh run download $runId --repo $repo --pattern *-TestResults +$files = Get-ChildItem -Path . -Recurse -File -process { - try { - Write-Output "Hello, $Subject!" - } catch { - throw $_ - } +LogGroup 'List TestResults files' { + $files.Name | Out-String } +$files | Format-Table -AutoSize | Out-String -end { - Write-Debug "[$scriptName] - End" +$allCases = [System.Collections.Generic.List[psobject]]::new() +foreach ($file in $files) { + $fileName = $file.BaseName + LogGroup $fileName { + Get-Content -Path $file | Out-String + } + LogGroup "$fileName - Process" { + $xmlDoc = [xml](Get-Content -Path $file.FullName) + $cases = $xmlDoc.SelectNodes('//test-case') | ForEach-Object { + [pscustomobject]@{ + Name = $_.name + Description = $_.description + Result = $_.result + Success = [bool]($_.success -eq 'True') + Time = [float]$_.time + Executed = [bool]($_.executed -eq 'True') + FailureMessage = $_.failure.message + StackTrace = $_.failure.'stack-trace' + } + } + $cases | ForEach-Object { $allCases.Add($_) } + $cases | Format-List | Out-String + } } From 3defe447645eb698d459983275af44f7875ea08f Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Mon, 3 Mar 2025 11:14:15 +0100 Subject: [PATCH 02/54] =?UTF-8?q?=F0=9F=AA=B2=20[Enhancement]:=20Create=20?= =?UTF-8?q?TestResults=20directory=20for=20organized=20file=20downloads?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/main.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 0442173..f56e450 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -6,8 +6,9 @@ param() $PSStyle.OutputRendering = 'Ansi' $repo = $env:GITHUB_REPOSITORY $runId = $env:GITHUB_RUN_ID -gh run download $runId --repo $repo --pattern *-TestResults -$files = Get-ChildItem -Path . -Recurse -File +$testResultsFolder = New-Item -Path . -ItemType Directory -Name 'TestResults' -Force +gh run download $runId --repo $repo --pattern *-TestResults --dir TestResults +$files = Get-ChildItem -Path $testResultsFolder -Recurse -File LogGroup 'List TestResults files' { $files.Name | Out-String From 2f56a541e4e0928411be9737cff01b6460749a40 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Mon, 3 Mar 2025 11:41:30 +0100 Subject: [PATCH 03/54] =?UTF-8?q?=F0=9F=AA=B2=20[Enhancement]:=20Add=20det?= =?UTF-8?q?ailed=20test=20results=20summary=20and=20processing=20in=20main?= =?UTF-8?q?.ps1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/main.ps1 | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index f56e450..365ea34 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -13,16 +13,16 @@ $files = Get-ChildItem -Path $testResultsFolder -Recurse -File LogGroup 'List TestResults files' { $files.Name | Out-String } -$files | Format-Table -AutoSize | Out-String $allCases = [System.Collections.Generic.List[psobject]]::new() +$testResults = [System.Collections.Generic.List[psobject]]::new() foreach ($file in $files) { $fileName = $file.BaseName + $xmlDoc = [xml](Get-Content -Path $file.FullName) LogGroup $fileName { Get-Content -Path $file | Out-String } - LogGroup "$fileName - Process" { - $xmlDoc = [xml](Get-Content -Path $file.FullName) + LogGroup "$fileName - Tests" { $cases = $xmlDoc.SelectNodes('//test-case') | ForEach-Object { [pscustomobject]@{ Name = $_.name @@ -38,4 +38,33 @@ foreach ($file in $files) { $cases | ForEach-Object { $allCases.Add($_) } $cases | Format-List | Out-String } + LogGroup "$fileName - Summary" { + $testResultXml = $xmlDoc.'test-results' + $testResult = [pscustomobject]@{ + Name = $testResultXml.name + Total = $testResultXml.total + Errors = $testResultXml.errors + Failures = $testResultXml.failures + NotRun = $testResultXml.'not-run' + Inconclusive = $testResultXml.inconclusive + Ignored = $testResultXml.ignored + Skipped = $testResultXml.skipped + Invalid = $testResultXml.invalid + Date = $testResultXml.date + Time = $testResultXml.time + } + $testResults.Add($testResult) + $testResult | Format-List | Out-String + } +} + +[pscustomobject]@{ + TotalTests = $allCases.Count + TotalErrors = $testResults | Measure-Object -Sum -Property Errors + TotalFailures = $testResults | Measure-Object -Sum -Property Failures + TotalNotRun = $testResults | Measure-Object -Sum -Property 'NotRun' + TotalInconclusive = $testResults | Measure-Object -Sum -Property Inconclusive + TotalIgnored = $testResults | Measure-Object -Sum -Property Ignored + TotalSkipped = $testResults | Measure-Object -Sum -Property Skipped + TotalInvalid = $testResults | Measure-Object -Sum -Property Invalid } From 2ea41f1c66adb63dda432b82336bc1cbb5677f98 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Mon, 3 Mar 2025 11:41:44 +0100 Subject: [PATCH 04/54] Fix: Correct property name for TotalNotRun in test results summary --- scripts/main.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 365ea34..eba4812 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -62,7 +62,7 @@ foreach ($file in $files) { TotalTests = $allCases.Count TotalErrors = $testResults | Measure-Object -Sum -Property Errors TotalFailures = $testResults | Measure-Object -Sum -Property Failures - TotalNotRun = $testResults | Measure-Object -Sum -Property 'NotRun' + TotalNotRun = $testResults | Measure-Object -Sum -Property NotRun TotalInconclusive = $testResults | Measure-Object -Sum -Property Inconclusive TotalIgnored = $testResults | Measure-Object -Sum -Property Ignored TotalSkipped = $testResults | Measure-Object -Sum -Property Skipped From 0e56432fd7a38d48ad649f3db7ba5bc8caca0ee8 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Mon, 3 Mar 2025 12:13:31 +0100 Subject: [PATCH 05/54] Fix: Update test results summary to correctly calculate totals for errors, failures, and other categories --- scripts/main.ps1 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index eba4812..e9cf7b3 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -60,11 +60,11 @@ foreach ($file in $files) { [pscustomobject]@{ TotalTests = $allCases.Count - TotalErrors = $testResults | Measure-Object -Sum -Property Errors - TotalFailures = $testResults | Measure-Object -Sum -Property Failures - TotalNotRun = $testResults | Measure-Object -Sum -Property NotRun - TotalInconclusive = $testResults | Measure-Object -Sum -Property Inconclusive - TotalIgnored = $testResults | Measure-Object -Sum -Property Ignored - TotalSkipped = $testResults | Measure-Object -Sum -Property Skipped - TotalInvalid = $testResults | Measure-Object -Sum -Property Invalid -} + TotalErrors = ($testResults | Measure-Object -Sum -Property Errors).Sum + TotalFailures = ($testResults | Measure-Object -Sum -Property Failures).Sum + TotalNotRun = ($testResults | Measure-Object -Sum -Property NotRun).Sum + TotalInconclusive = ($testResults | Measure-Object -Sum -Property Inconclusive).Sum + TotalIgnored = ($testResults | Measure-Object -Sum -Property Ignored).Sum + TotalSkipped = ($testResults | Measure-Object -Sum -Property Skipped).Sum + TotalInvalid = ($testResults | Measure-Object -Sum -Property Invalid).Sum +} | Format-List | Out-String From 86da1511f3a819202bcc2815966b98019218019b Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Mon, 3 Mar 2025 12:13:45 +0100 Subject: [PATCH 06/54] Fix: Change output format of test results summary from list to table for better readability --- scripts/main.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index e9cf7b3..7ba245d 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -67,4 +67,4 @@ foreach ($file in $files) { TotalIgnored = ($testResults | Measure-Object -Sum -Property Ignored).Sum TotalSkipped = ($testResults | Measure-Object -Sum -Property Skipped).Sum TotalInvalid = ($testResults | Measure-Object -Sum -Property Invalid).Sum -} | Format-List | Out-String +} | Format-Table | Out-String From 1bbe463b0905a1486ce254afa9b8f7a830628206 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Mon, 3 Mar 2025 12:33:57 +0100 Subject: [PATCH 07/54] Fix: Update test results summary output format to table and round totals for better accuracy --- scripts/main.ps1 | 42 +++++++++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 7ba245d..e8cf7af 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -36,7 +36,7 @@ foreach ($file in $files) { } } $cases | ForEach-Object { $allCases.Add($_) } - $cases | Format-List | Out-String + $cases | Format-Table | Out-String } LogGroup "$fileName - Summary" { $testResultXml = $xmlDoc.'test-results' @@ -54,17 +54,37 @@ foreach ($file in $files) { Time = $testResultXml.time } $testResults.Add($testResult) - $testResult | Format-List | Out-String + $testResult | Format-Table | Out-String } } -[pscustomobject]@{ - TotalTests = $allCases.Count - TotalErrors = ($testResults | Measure-Object -Sum -Property Errors).Sum - TotalFailures = ($testResults | Measure-Object -Sum -Property Failures).Sum - TotalNotRun = ($testResults | Measure-Object -Sum -Property NotRun).Sum - TotalInconclusive = ($testResults | Measure-Object -Sum -Property Inconclusive).Sum - TotalIgnored = ($testResults | Measure-Object -Sum -Property Ignored).Sum - TotalSkipped = ($testResults | Measure-Object -Sum -Property Skipped).Sum - TotalInvalid = ($testResults | Measure-Object -Sum -Property Invalid).Sum +$total = [pscustomobject]@{ + Tests = $allCases.Count + Errors = [math]::Round(($testResults | Measure-Object -Sum -Property Errors).Sum) + Failures = [math]::Round(($testResults | Measure-Object -Sum -Property Failures).Sum) + NotRun = [math]::Round(($testResults | Measure-Object -Sum -Property NotRun).Sum) + Inconclusive = [math]::Round(($testResults | Measure-Object -Sum -Property Inconclusive).Sum) + Ignored = [math]::Round(($testResults | Measure-Object -Sum -Property Ignored).Sum) + Skipped = [math]::Round(($testResults | Measure-Object -Sum -Property Skipped).Sum) + Invalid = [math]::Round(($testResults | Measure-Object -Sum -Property Invalid).Sum) } | Format-Table | Out-String + +if ($total.Failures -gt 0) { + Write-GitHubError "There are $($total.Failures) failed tests of $($total.Tests) tests" + return $_.Failures +} + +if ($total.Errors -gt 0) { + Write-GitHubError "There are $($total.Errors) test errors of $($total.Tests) tests" + return $_.Errors +} + +if ($total.Invalid -gt 0) { + Write-GitHubError "There are $($total.Invalid) invalid test of $($total.Tests) tests" + return $_.Invalid +} + +if ($total.NotRun -gt 0) { + Write-GitHubError "There are $($total.NotRun) test not run of $($total.Tests) tests" + return $_.NotRun +} From 49943516f8dcaa6822b143dc853c6fb9e408c183 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Mon, 3 Mar 2025 12:40:18 +0100 Subject: [PATCH 08/54] Fix: Correctly format total test results output as a table --- scripts/main.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index e8cf7af..043ba9e 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -67,7 +67,8 @@ $total = [pscustomobject]@{ Ignored = [math]::Round(($testResults | Measure-Object -Sum -Property Ignored).Sum) Skipped = [math]::Round(($testResults | Measure-Object -Sum -Property Skipped).Sum) Invalid = [math]::Round(($testResults | Measure-Object -Sum -Property Invalid).Sum) -} | Format-Table | Out-String +} +$total | Format-Table | Out-String if ($total.Failures -gt 0) { Write-GitHubError "There are $($total.Failures) failed tests of $($total.Tests) tests" From 8363d4f98a3fcc8a23a4025ca266406e7d6c2332 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Mon, 3 Mar 2025 12:49:43 +0100 Subject: [PATCH 09/54] Fix: Ensure test results summary correctly rounds and casts totals to integers --- scripts/main.ps1 | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 043ba9e..4f53313 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -60,32 +60,40 @@ foreach ($file in $files) { $total = [pscustomobject]@{ Tests = $allCases.Count - Errors = [math]::Round(($testResults | Measure-Object -Sum -Property Errors).Sum) - Failures = [math]::Round(($testResults | Measure-Object -Sum -Property Failures).Sum) - NotRun = [math]::Round(($testResults | Measure-Object -Sum -Property NotRun).Sum) - Inconclusive = [math]::Round(($testResults | Measure-Object -Sum -Property Inconclusive).Sum) - Ignored = [math]::Round(($testResults | Measure-Object -Sum -Property Ignored).Sum) - Skipped = [math]::Round(($testResults | Measure-Object -Sum -Property Skipped).Sum) - Invalid = [math]::Round(($testResults | Measure-Object -Sum -Property Invalid).Sum) + Failures = [int]([math]::Round(($testResults | Measure-Object -Sum -Property Failures).Sum)) + Errors = [int]([math]::Round(($testResults | Measure-Object -Sum -Property Errors).Sum)) + Invalid = [int]([math]::Round(($testResults | Measure-Object -Sum -Property Invalid).Sum)) + NotRun = [int]([math]::Round(($testResults | Measure-Object -Sum -Property NotRun).Sum)) + Inconclusive = [int]([math]::Round(($testResults | Measure-Object -Sum -Property Inconclusive).Sum)) + Ignored = [int]([math]::Round(($testResults | Measure-Object -Sum -Property Ignored).Sum)) + Skipped = [int]([math]::Round(($testResults | Measure-Object -Sum -Property Skipped).Sum)) } $total | Format-Table | Out-String +$totalErrors = 0 if ($total.Failures -gt 0) { Write-GitHubError "There are $($total.Failures) failed tests of $($total.Tests) tests" - return $_.Failures + $totalErrors += $_.Failures } if ($total.Errors -gt 0) { Write-GitHubError "There are $($total.Errors) test errors of $($total.Tests) tests" - return $_.Errors + $totalErrors += $_.Errors } if ($total.Invalid -gt 0) { Write-GitHubError "There are $($total.Invalid) invalid test of $($total.Tests) tests" - return $_.Invalid + $totalErrors += $_.Invalid } if ($total.NotRun -gt 0) { Write-GitHubError "There are $($total.NotRun) test not run of $($total.Tests) tests" - return $_.NotRun + $totalErrors += $_.NotRun } + +if ($total.Inconclusive -gt 0) { + Write-GitHubError "There are $($total.Inconclusive) inconclusive tests of $($total.Tests) tests" + $totalErrors += $_.Inconclusive +} + +exit $totalErrors From d6c4dc50152610b980ae3c476d196984df8dd4ad Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Mon, 3 Mar 2025 22:22:26 +0100 Subject: [PATCH 10/54] Refactor: Comment out unused code for test results processing to improve readability --- scripts/main.ps1 | 154 +++++++++++++++++++++++------------------------ 1 file changed, 77 insertions(+), 77 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 4f53313..cf01904 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -8,92 +8,92 @@ $repo = $env:GITHUB_REPOSITORY $runId = $env:GITHUB_RUN_ID $testResultsFolder = New-Item -Path . -ItemType Directory -Name 'TestResults' -Force gh run download $runId --repo $repo --pattern *-TestResults --dir TestResults -$files = Get-ChildItem -Path $testResultsFolder -Recurse -File +$files = Get-ChildItem -Path $testResultsFolder -Recurse -File -Filter *.json LogGroup 'List TestResults files' { $files.Name | Out-String } -$allCases = [System.Collections.Generic.List[psobject]]::new() -$testResults = [System.Collections.Generic.List[psobject]]::new() -foreach ($file in $files) { - $fileName = $file.BaseName - $xmlDoc = [xml](Get-Content -Path $file.FullName) - LogGroup $fileName { - Get-Content -Path $file | Out-String - } - LogGroup "$fileName - Tests" { - $cases = $xmlDoc.SelectNodes('//test-case') | ForEach-Object { - [pscustomobject]@{ - Name = $_.name - Description = $_.description - Result = $_.result - Success = [bool]($_.success -eq 'True') - Time = [float]$_.time - Executed = [bool]($_.executed -eq 'True') - FailureMessage = $_.failure.message - StackTrace = $_.failure.'stack-trace' - } - } - $cases | ForEach-Object { $allCases.Add($_) } - $cases | Format-Table | Out-String - } - LogGroup "$fileName - Summary" { - $testResultXml = $xmlDoc.'test-results' - $testResult = [pscustomobject]@{ - Name = $testResultXml.name - Total = $testResultXml.total - Errors = $testResultXml.errors - Failures = $testResultXml.failures - NotRun = $testResultXml.'not-run' - Inconclusive = $testResultXml.inconclusive - Ignored = $testResultXml.ignored - Skipped = $testResultXml.skipped - Invalid = $testResultXml.invalid - Date = $testResultXml.date - Time = $testResultXml.time - } - $testResults.Add($testResult) - $testResult | Format-Table | Out-String - } -} +# $allCases = [System.Collections.Generic.List[psobject]]::new() +# $testResults = [System.Collections.Generic.List[psobject]]::new() +# foreach ($file in $files) { +# $fileName = $file.BaseName +# $xmlDoc = [xml](Get-Content -Path $file.FullName) +# LogGroup $fileName { +# Get-Content -Path $file | Out-String +# } +# LogGroup "$fileName - Tests" { +# $cases = $xmlDoc.SelectNodes('//test-case') | ForEach-Object { +# [pscustomobject]@{ +# Name = $_.name +# Description = $_.description +# Result = $_.result +# Success = [bool]($_.success -eq 'True') +# Time = [float]$_.time +# Executed = [bool]($_.executed -eq 'True') +# FailureMessage = $_.failure.message +# StackTrace = $_.failure.'stack-trace' +# } +# } +# $cases | ForEach-Object { $allCases.Add($_) } +# $cases | Format-Table | Out-String +# } +# LogGroup "$fileName - Summary" { +# $testResultXml = $xmlDoc.'test-results' +# $testResult = [pscustomobject]@{ +# Name = $testResultXml.name +# Total = $testResultXml.total +# Errors = $testResultXml.errors +# Failures = $testResultXml.failures +# NotRun = $testResultXml.'not-run' +# Inconclusive = $testResultXml.inconclusive +# Ignored = $testResultXml.ignored +# Skipped = $testResultXml.skipped +# Invalid = $testResultXml.invalid +# Date = $testResultXml.date +# Time = $testResultXml.time +# } +# $testResults.Add($testResult) +# $testResult | Format-Table | Out-String +# } +# } -$total = [pscustomobject]@{ - Tests = $allCases.Count - Failures = [int]([math]::Round(($testResults | Measure-Object -Sum -Property Failures).Sum)) - Errors = [int]([math]::Round(($testResults | Measure-Object -Sum -Property Errors).Sum)) - Invalid = [int]([math]::Round(($testResults | Measure-Object -Sum -Property Invalid).Sum)) - NotRun = [int]([math]::Round(($testResults | Measure-Object -Sum -Property NotRun).Sum)) - Inconclusive = [int]([math]::Round(($testResults | Measure-Object -Sum -Property Inconclusive).Sum)) - Ignored = [int]([math]::Round(($testResults | Measure-Object -Sum -Property Ignored).Sum)) - Skipped = [int]([math]::Round(($testResults | Measure-Object -Sum -Property Skipped).Sum)) -} -$total | Format-Table | Out-String +# $total = [pscustomobject]@{ +# Tests = $allCases.Count +# Failures = [int]([math]::Round(($testResults | Measure-Object -Sum -Property Failures).Sum)) +# Errors = [int]([math]::Round(($testResults | Measure-Object -Sum -Property Errors).Sum)) +# Invalid = [int]([math]::Round(($testResults | Measure-Object -Sum -Property Invalid).Sum)) +# NotRun = [int]([math]::Round(($testResults | Measure-Object -Sum -Property NotRun).Sum)) +# Inconclusive = [int]([math]::Round(($testResults | Measure-Object -Sum -Property Inconclusive).Sum)) +# Ignored = [int]([math]::Round(($testResults | Measure-Object -Sum -Property Ignored).Sum)) +# Skipped = [int]([math]::Round(($testResults | Measure-Object -Sum -Property Skipped).Sum)) +# } +# $total | Format-Table | Out-String -$totalErrors = 0 -if ($total.Failures -gt 0) { - Write-GitHubError "There are $($total.Failures) failed tests of $($total.Tests) tests" - $totalErrors += $_.Failures -} +# $totalErrors = 0 +# if ($total.Failures -gt 0) { +# Write-GitHubError "There are $($total.Failures) failed tests of $($total.Tests) tests" +# $totalErrors += $_.Failures +# } -if ($total.Errors -gt 0) { - Write-GitHubError "There are $($total.Errors) test errors of $($total.Tests) tests" - $totalErrors += $_.Errors -} +# if ($total.Errors -gt 0) { +# Write-GitHubError "There are $($total.Errors) test errors of $($total.Tests) tests" +# $totalErrors += $_.Errors +# } -if ($total.Invalid -gt 0) { - Write-GitHubError "There are $($total.Invalid) invalid test of $($total.Tests) tests" - $totalErrors += $_.Invalid -} +# if ($total.Invalid -gt 0) { +# Write-GitHubError "There are $($total.Invalid) invalid test of $($total.Tests) tests" +# $totalErrors += $_.Invalid +# } -if ($total.NotRun -gt 0) { - Write-GitHubError "There are $($total.NotRun) test not run of $($total.Tests) tests" - $totalErrors += $_.NotRun -} +# if ($total.NotRun -gt 0) { +# Write-GitHubError "There are $($total.NotRun) test not run of $($total.Tests) tests" +# $totalErrors += $_.NotRun +# } -if ($total.Inconclusive -gt 0) { - Write-GitHubError "There are $($total.Inconclusive) inconclusive tests of $($total.Tests) tests" - $totalErrors += $_.Inconclusive -} +# if ($total.Inconclusive -gt 0) { +# Write-GitHubError "There are $($total.Inconclusive) inconclusive tests of $($total.Tests) tests" +# $totalErrors += $_.Inconclusive +# } -exit $totalErrors +# exit $totalErrors From 8029fb58ceaed7647be997bfb64537ad956072f4 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Mon, 3 Mar 2025 22:42:50 +0100 Subject: [PATCH 11/54] Refactor: Simplify test results processing by removing unused code and updating output format to JSON --- scripts/main.ps1 | 114 +++++++++++++++-------------------------------- 1 file changed, 36 insertions(+), 78 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index cf01904..92d5e91 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -14,86 +14,44 @@ LogGroup 'List TestResults files' { $files.Name | Out-String } -# $allCases = [System.Collections.Generic.List[psobject]]::new() -# $testResults = [System.Collections.Generic.List[psobject]]::new() -# foreach ($file in $files) { -# $fileName = $file.BaseName -# $xmlDoc = [xml](Get-Content -Path $file.FullName) -# LogGroup $fileName { -# Get-Content -Path $file | Out-String -# } -# LogGroup "$fileName - Tests" { -# $cases = $xmlDoc.SelectNodes('//test-case') | ForEach-Object { -# [pscustomobject]@{ -# Name = $_.name -# Description = $_.description -# Result = $_.result -# Success = [bool]($_.success -eq 'True') -# Time = [float]$_.time -# Executed = [bool]($_.executed -eq 'True') -# FailureMessage = $_.failure.message -# StackTrace = $_.failure.'stack-trace' -# } -# } -# $cases | ForEach-Object { $allCases.Add($_) } -# $cases | Format-Table | Out-String -# } -# LogGroup "$fileName - Summary" { -# $testResultXml = $xmlDoc.'test-results' -# $testResult = [pscustomobject]@{ -# Name = $testResultXml.name -# Total = $testResultXml.total -# Errors = $testResultXml.errors -# Failures = $testResultXml.failures -# NotRun = $testResultXml.'not-run' -# Inconclusive = $testResultXml.inconclusive -# Ignored = $testResultXml.ignored -# Skipped = $testResultXml.skipped -# Invalid = $testResultXml.invalid -# Date = $testResultXml.date -# Time = $testResultXml.time -# } -# $testResults.Add($testResult) -# $testResult | Format-Table | Out-String -# } -# } - -# $total = [pscustomobject]@{ -# Tests = $allCases.Count -# Failures = [int]([math]::Round(($testResults | Measure-Object -Sum -Property Failures).Sum)) -# Errors = [int]([math]::Round(($testResults | Measure-Object -Sum -Property Errors).Sum)) -# Invalid = [int]([math]::Round(($testResults | Measure-Object -Sum -Property Invalid).Sum)) -# NotRun = [int]([math]::Round(($testResults | Measure-Object -Sum -Property NotRun).Sum)) -# Inconclusive = [int]([math]::Round(($testResults | Measure-Object -Sum -Property Inconclusive).Sum)) -# Ignored = [int]([math]::Round(($testResults | Measure-Object -Sum -Property Ignored).Sum)) -# Skipped = [int]([math]::Round(($testResults | Measure-Object -Sum -Property Skipped).Sum)) -# } -# $total | Format-Table | Out-String - -# $totalErrors = 0 -# if ($total.Failures -gt 0) { -# Write-GitHubError "There are $($total.Failures) failed tests of $($total.Tests) tests" -# $totalErrors += $_.Failures -# } +$testResults = [System.Collections.Generic.List[psobject]]::new() +foreach ($file in $files) { + $fileName = $file.BaseName + LogGroup $fileName { + $content = Get-Content -Path $file + $content | Out-String + } + LogGroup "$fileName - Summary" { + $object = $content | ConvertFrom-Json + $object | Format-Table | Out-String + $testResults.Add($object) + } +} -# if ($total.Errors -gt 0) { -# Write-GitHubError "There are $($total.Errors) test errors of $($total.Tests) tests" -# $totalErrors += $_.Errors -# } +$total = [pscustomobject]@{ + Tests = [int]([math]::Round(($testResults | Measure-Object -Sum -Property TotalCount).Sum)) + Passed = [int]([math]::Round(($testResults | Measure-Object -Sum -Property PassedCount).Sum)) + Failed = [int]([math]::Round(($testResults | Measure-Object -Sum -Property FailedCount).Sum)) + NotRun = [int]([math]::Round(($testResults | Measure-Object -Sum -Property NotRunCount).Sum)) + Inconclusive = [int]([math]::Round(($testResults | Measure-Object -Sum -Property InconclusiveCount).Sum)) + Skipped = [int]([math]::Round(($testResults | Measure-Object -Sum -Property SkippedCount).Sum)) +} +$total | Format-Table | Out-String -# if ($total.Invalid -gt 0) { -# Write-GitHubError "There are $($total.Invalid) invalid test of $($total.Tests) tests" -# $totalErrors += $_.Invalid -# } +$totalErrors = 0 +if ($total.Failed -gt 0) { + Write-GitHubError "There are $($total.Failed) failed tests of $($total.Tests) tests" + $totalErrors += $total.Failed +} -# if ($total.NotRun -gt 0) { -# Write-GitHubError "There are $($total.NotRun) test not run of $($total.Tests) tests" -# $totalErrors += $_.NotRun -# } +if ($total.NotRun -gt 0) { + Write-GitHubError "There are $($total.NotRun) test not run of $($total.Tests) tests" + $totalErrors += $_.NotRun +} -# if ($total.Inconclusive -gt 0) { -# Write-GitHubError "There are $($total.Inconclusive) inconclusive tests of $($total.Tests) tests" -# $totalErrors += $_.Inconclusive -# } +if ($total.Inconclusive -gt 0) { + Write-GitHubError "There are $($total.Inconclusive) inconclusive tests of $($total.Tests) tests" + $totalErrors += $_.Inconclusive +} -# exit $totalErrors +exit $totalErrors From 8bfdc2a321f2be7502f436a82ad03440e284bd49 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Mon, 3 Mar 2025 23:05:10 +0100 Subject: [PATCH 12/54] Refactor: Streamline test results processing by removing unnecessary logging and enhancing summary output format --- scripts/main.ps1 | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 92d5e91..04e2cb7 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -17,26 +17,38 @@ LogGroup 'List TestResults files' { $testResults = [System.Collections.Generic.List[psobject]]::new() foreach ($file in $files) { $fileName = $file.BaseName - LogGroup $fileName { - $content = Get-Content -Path $file - $content | Out-String - } - LogGroup "$fileName - Summary" { - $object = $content | ConvertFrom-Json - $object | Format-Table | Out-String - $testResults.Add($object) + $content = Get-Content -Path $file + $object = $content | ConvertFrom-Json + $testResults.Add($object) + + # LogGroup $fileName { + # $content | Out-String + # } + + LogGroup "$fileName" { + $result = [pscustomobject]@{ + Tests = [int]([math]::Round(($object | Measure-Object -Sum -Property TotalCount).Sum)) + Passed = [int]([math]::Round(($object | Measure-Object -Sum -Property PassedCount).Sum)) + Failed = [int]([math]::Round(($object | Measure-Object -Sum -Property FailedCount).Sum)) + NotRun = [int]([math]::Round(($object | Measure-Object -Sum -Property NotRunCount).Sum)) + Inconclusive = [int]([math]::Round(($object | Measure-Object -Sum -Property InconclusiveCount).Sum)) + Skipped = [int]([math]::Round(($object | Measure-Object -Sum -Property SkippedCount).Sum)) + } + $result | Format-Table | Out-String } } -$total = [pscustomobject]@{ - Tests = [int]([math]::Round(($testResults | Measure-Object -Sum -Property TotalCount).Sum)) - Passed = [int]([math]::Round(($testResults | Measure-Object -Sum -Property PassedCount).Sum)) - Failed = [int]([math]::Round(($testResults | Measure-Object -Sum -Property FailedCount).Sum)) - NotRun = [int]([math]::Round(($testResults | Measure-Object -Sum -Property NotRunCount).Sum)) - Inconclusive = [int]([math]::Round(($testResults | Measure-Object -Sum -Property InconclusiveCount).Sum)) - Skipped = [int]([math]::Round(($testResults | Measure-Object -Sum -Property SkippedCount).Sum)) +LogGroup 'TestResult - Summary' { + $total = [pscustomobject]@{ + Tests = [int]([math]::Round(($testResults | Measure-Object -Sum -Property TotalCount).Sum)) + Passed = [int]([math]::Round(($testResults | Measure-Object -Sum -Property PassedCount).Sum)) + Failed = [int]([math]::Round(($testResults | Measure-Object -Sum -Property FailedCount).Sum)) + NotRun = [int]([math]::Round(($testResults | Measure-Object -Sum -Property NotRunCount).Sum)) + Inconclusive = [int]([math]::Round(($testResults | Measure-Object -Sum -Property InconclusiveCount).Sum)) + Skipped = [int]([math]::Round(($testResults | Measure-Object -Sum -Property SkippedCount).Sum)) + } + $total | Format-Table | Out-String } -$total | Format-Table | Out-String $totalErrors = 0 if ($total.Failed -gt 0) { From eab1b6be0dce41decdcb35c93cc8d9fd25a86c2d Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Mon, 3 Mar 2025 23:26:07 +0100 Subject: [PATCH 13/54] Refactor: Sort test results files and enhance output formatting with color coding --- scripts/main.ps1 | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 04e2cb7..de10568 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -8,7 +8,7 @@ $repo = $env:GITHUB_REPOSITORY $runId = $env:GITHUB_RUN_ID $testResultsFolder = New-Item -Path . -ItemType Directory -Name 'TestResults' -Force gh run download $runId --repo $repo --pattern *-TestResults --dir TestResults -$files = Get-ChildItem -Path $testResultsFolder -Recurse -File -Filter *.json +$files = Get-ChildItem -Path $testResultsFolder -Recurse -File -Filter *.json | Sort-Object Name LogGroup 'List TestResults files' { $files.Name | Out-String @@ -21,19 +21,18 @@ foreach ($file in $files) { $object = $content | ConvertFrom-Json $testResults.Add($object) - # LogGroup $fileName { - # $content | Out-String - # } - - LogGroup "$fileName" { - $result = [pscustomobject]@{ - Tests = [int]([math]::Round(($object | Measure-Object -Sum -Property TotalCount).Sum)) - Passed = [int]([math]::Round(($object | Measure-Object -Sum -Property PassedCount).Sum)) - Failed = [int]([math]::Round(($object | Measure-Object -Sum -Property FailedCount).Sum)) - NotRun = [int]([math]::Round(($object | Measure-Object -Sum -Property NotRunCount).Sum)) - Inconclusive = [int]([math]::Round(($object | Measure-Object -Sum -Property InconclusiveCount).Sum)) - Skipped = [int]([math]::Round(($object | Measure-Object -Sum -Property SkippedCount).Sum)) - } + $result = [pscustomobject]@{ + Tests = [int]([math]::Round(($object | Measure-Object -Sum -Property TotalCount).Sum)) + Passed = [int]([math]::Round(($object | Measure-Object -Sum -Property PassedCount).Sum)) + Failed = [int]([math]::Round(($object | Measure-Object -Sum -Property FailedCount).Sum)) + NotRun = [int]([math]::Round(($object | Measure-Object -Sum -Property NotRunCount).Sum)) + Inconclusive = [int]([math]::Round(($object | Measure-Object -Sum -Property InconclusiveCount).Sum)) + Skipped = [int]([math]::Round(($object | Measure-Object -Sum -Property SkippedCount).Sum)) + } + $failed = ($result.Failed -gt 0) -or ($result.NotRun -gt 0) -or ($result.Inconclusive -gt 0) + $color = $failed ? $PSStyle.Foreground.Red : $PSStyle.Foreground.Green + $reset = $PSStyle.Reset + LogGroup "$color$fileName$reset" { $result | Format-Table | Out-String } } From 2924e7fb251d204c3269772fb72ecb793c1dcd91 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Mon, 3 Mar 2025 23:45:38 +0100 Subject: [PATCH 14/54] Refactor: Improve test results summary output formatting and enhance visual separation --- scripts/main.ps1 | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index de10568..1ba5183 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -32,20 +32,23 @@ foreach ($file in $files) { $failed = ($result.Failed -gt 0) -or ($result.NotRun -gt 0) -or ($result.Inconclusive -gt 0) $color = $failed ? $PSStyle.Foreground.Red : $PSStyle.Foreground.Green $reset = $PSStyle.Reset - LogGroup "$color$fileName$reset" { + LogGroup " - $color$fileName$reset" { $result | Format-Table | Out-String } } - -LogGroup 'TestResult - Summary' { - $total = [pscustomobject]@{ - Tests = [int]([math]::Round(($testResults | Measure-Object -Sum -Property TotalCount).Sum)) - Passed = [int]([math]::Round(($testResults | Measure-Object -Sum -Property PassedCount).Sum)) - Failed = [int]([math]::Round(($testResults | Measure-Object -Sum -Property FailedCount).Sum)) - NotRun = [int]([math]::Round(($testResults | Measure-Object -Sum -Property NotRunCount).Sum)) - Inconclusive = [int]([math]::Round(($testResults | Measure-Object -Sum -Property InconclusiveCount).Sum)) - Skipped = [int]([math]::Round(($testResults | Measure-Object -Sum -Property SkippedCount).Sum)) - } +Write-Output ('─' * 80) +$total = [pscustomobject]@{ + Tests = [int]([math]::Round(($testResults | Measure-Object -Sum -Property TotalCount).Sum)) + Passed = [int]([math]::Round(($testResults | Measure-Object -Sum -Property PassedCount).Sum)) + Failed = [int]([math]::Round(($testResults | Measure-Object -Sum -Property FailedCount).Sum)) + NotRun = [int]([math]::Round(($testResults | Measure-Object -Sum -Property NotRunCount).Sum)) + Inconclusive = [int]([math]::Round(($testResults | Measure-Object -Sum -Property InconclusiveCount).Sum)) + Skipped = [int]([math]::Round(($testResults | Measure-Object -Sum -Property SkippedCount).Sum)) +} +$failed = ($result.Failed -gt 0) -or ($result.NotRun -gt 0) -or ($result.Inconclusive -gt 0) +$color = $failed ? $PSStyle.Foreground.Red : $PSStyle.Foreground.Green +$reset = $PSStyle.Reset +LogGroup " - $color`TestResult - Summary$reset" { $total | Format-Table | Out-String } From d93311a3857f2e2f79e053a488d2c184e9cc5a68 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Mon, 3 Mar 2025 23:58:35 +0100 Subject: [PATCH 15/54] Refactor: Simplify logging output and improve test results summary formatting --- scripts/main.ps1 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 1ba5183..6494e5b 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -10,7 +10,7 @@ $testResultsFolder = New-Item -Path . -ItemType Directory -Name 'TestResults' -F gh run download $runId --repo $repo --pattern *-TestResults --dir TestResults $files = Get-ChildItem -Path $testResultsFolder -Recurse -File -Filter *.json | Sort-Object Name -LogGroup 'List TestResults files' { +LogGroup 'List files' { $files.Name | Out-String } @@ -32,11 +32,12 @@ foreach ($file in $files) { $failed = ($result.Failed -gt 0) -or ($result.NotRun -gt 0) -or ($result.Inconclusive -gt 0) $color = $failed ? $PSStyle.Foreground.Red : $PSStyle.Foreground.Green $reset = $PSStyle.Reset - LogGroup " - $color$fileName$reset" { + $logGroupName = $fileName.Replace('-TestResult-Report', '') + LogGroup " - $color$logGroupName$reset" { $result | Format-Table | Out-String } } -Write-Output ('─' * 80) +Write-Output ('─' * 50) $total = [pscustomobject]@{ Tests = [int]([math]::Round(($testResults | Measure-Object -Sum -Property TotalCount).Sum)) Passed = [int]([math]::Round(($testResults | Measure-Object -Sum -Property PassedCount).Sum)) @@ -48,7 +49,7 @@ $total = [pscustomobject]@{ $failed = ($result.Failed -gt 0) -or ($result.NotRun -gt 0) -or ($result.Inconclusive -gt 0) $color = $failed ? $PSStyle.Foreground.Red : $PSStyle.Foreground.Green $reset = $PSStyle.Reset -LogGroup " - $color`TestResult - Summary$reset" { +LogGroup " - $color`Summary$reset" { $total | Format-Table | Out-String } From 2275cdbf3bd7ce83a80c2d42264f8a7e66e57d6c Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Thu, 6 Mar 2025 17:19:18 +0100 Subject: [PATCH 16/54] Refactor: Update default working directory in action.yml for improved clarity --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index a160f2f..d607870 100644 --- a/action.yml +++ b/action.yml @@ -24,7 +24,7 @@ inputs: WorkingDirectory: description: The working directory where the script will run from. required: false - default: ${{ github.workspace }} + default: '.' runs: using: composite From 3cb6ec91efff1dbb056cc68ccd1170a891ed940d Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 8 Mar 2025 11:55:21 +0100 Subject: [PATCH 17/54] Refactor: Remove unnecessary environment variable from Auto-Release workflow --- .github/workflows/Auto-Release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/Auto-Release.yml b/.github/workflows/Auto-Release.yml index 1a580b8..a26805f 100644 --- a/.github/workflows/Auto-Release.yml +++ b/.github/workflows/Auto-Release.yml @@ -30,5 +30,4 @@ jobs: - name: Auto-Release uses: PSModule/Auto-Release@v1 - env: - GITHUB_TOKEN: ${{ github.token }} + From 26d2b11e8ac7fbf59914cdea3fd872adef7a7627 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 22 Mar 2025 01:09:57 +0100 Subject: [PATCH 18/54] Refactor: Enhance error handling in test results processing and improve output clarity --- scripts/main.ps1 | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 6494e5b..0a2c4ef 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -15,6 +15,8 @@ LogGroup 'List files' { } $testResults = [System.Collections.Generic.List[psobject]]::new() +$totalErrors = 0 + foreach ($file in $files) { $fileName = $file.BaseName $content = Get-Content -Path $file @@ -29,14 +31,26 @@ foreach ($file in $files) { Inconclusive = [int]([math]::Round(($object | Measure-Object -Sum -Property InconclusiveCount).Sum)) Skipped = [int]([math]::Round(($object | Measure-Object -Sum -Property SkippedCount).Sum)) } - $failed = ($result.Failed -gt 0) -or ($result.NotRun -gt 0) -or ($result.Inconclusive -gt 0) + + $failed = ($result.Failed -gt 0) -or ($result.NotRun -gt 0) -or ($result.Inconclusive -gt 0) -or ($object.Result -eq 'Failed') -or ($object.Executed -eq $false) $color = $failed ? $PSStyle.Foreground.Red : $PSStyle.Foreground.Green $reset = $PSStyle.Reset $logGroupName = $fileName.Replace('-TestResult-Report', '') LogGroup " - $color$logGroupName$reset" { $result | Format-Table | Out-String } + + if ($object.Result -eq 'Failed') { + Write-GitHubError "Test result explicitly marked as Failed in file: $($file.Name)" + $totalErrors++ + } + + if ($object.Executed -eq $false) { + Write-GitHubError "Test was not executed as reported in file: $($file.Name)" + $totalErrors++ + } } + Write-Output ('─' * 50) $total = [pscustomobject]@{ Tests = [int]([math]::Round(($testResults | Measure-Object -Sum -Property TotalCount).Sum)) @@ -46,27 +60,27 @@ $total = [pscustomobject]@{ Inconclusive = [int]([math]::Round(($testResults | Measure-Object -Sum -Property InconclusiveCount).Sum)) Skipped = [int]([math]::Round(($testResults | Measure-Object -Sum -Property SkippedCount).Sum)) } -$failed = ($result.Failed -gt 0) -or ($result.NotRun -gt 0) -or ($result.Inconclusive -gt 0) + +$failed = ($total.Failed -gt 0) -or ($total.NotRun -gt 0) -or ($total.Inconclusive -gt 0) $color = $failed ? $PSStyle.Foreground.Red : $PSStyle.Foreground.Green $reset = $PSStyle.Reset LogGroup " - $color`Summary$reset" { $total | Format-Table | Out-String } -$totalErrors = 0 if ($total.Failed -gt 0) { Write-GitHubError "There are $($total.Failed) failed tests of $($total.Tests) tests" $totalErrors += $total.Failed } if ($total.NotRun -gt 0) { - Write-GitHubError "There are $($total.NotRun) test not run of $($total.Tests) tests" - $totalErrors += $_.NotRun + Write-GitHubError "There are $($total.NotRun) tests not run of $($total.Tests) tests" + $totalErrors += $total.NotRun } if ($total.Inconclusive -gt 0) { Write-GitHubError "There are $($total.Inconclusive) inconclusive tests of $($total.Tests) tests" - $totalErrors += $_.Inconclusive + $totalErrors += $total.Inconclusive } exit $totalErrors From f6856dc58e4308426c25125cd3a1222ae40c320f Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 22 Mar 2025 01:20:16 +0100 Subject: [PATCH 19/54] Refactor: Improve code structure by consolidating error handling for test results --- scripts/main.ps1 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 0a2c4ef..7a40aac 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -38,16 +38,16 @@ foreach ($file in $files) { $logGroupName = $fileName.Replace('-TestResult-Report', '') LogGroup " - $color$logGroupName$reset" { $result | Format-Table | Out-String - } - if ($object.Result -eq 'Failed') { - Write-GitHubError "Test result explicitly marked as Failed in file: $($file.Name)" - $totalErrors++ - } + if ($object.Result -eq 'Failed') { + Write-GitHubError "Test result explicitly marked as Failed in file: $($file.Name)" + $totalErrors++ + } - if ($object.Executed -eq $false) { - Write-GitHubError "Test was not executed as reported in file: $($file.Name)" - $totalErrors++ + if ($object.Executed -eq $false) { + Write-GitHubError "Test was not executed as reported in file: $($file.Name)" + $totalErrors++ + } } } From 43968e1a9d1a925a8d4c4c61f46c18e8f42805e9 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 22 Mar 2025 01:30:17 +0100 Subject: [PATCH 20/54] Refactor: Enhance failure condition checks in test results summary logic --- scripts/main.ps1 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 7a40aac..72b6b98 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -61,7 +61,13 @@ $total = [pscustomobject]@{ Skipped = [int]([math]::Round(($testResults | Measure-Object -Sum -Property SkippedCount).Sum)) } -$failed = ($total.Failed -gt 0) -or ($total.NotRun -gt 0) -or ($total.Inconclusive -gt 0) +$failed = ( + $total.Failed -gt 0 -or + $total.NotRun -gt 0 -or + $total.Inconclusive -gt 0 -or + $object.Executed -eq $false -or + $object.Result -eq 'Failed' +) $color = $failed ? $PSStyle.Foreground.Red : $PSStyle.Foreground.Green $reset = $PSStyle.Reset LogGroup " - $color`Summary$reset" { From a5642a735407031b39edae1c3ad00636b0f9d63f Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 22 Mar 2025 01:42:09 +0100 Subject: [PATCH 21/54] Refactor: Improve test results processing by adding lists for failed and unexecuted tests --- scripts/main.ps1 | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 72b6b98..19a574d 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -15,6 +15,8 @@ LogGroup 'List files' { } $testResults = [System.Collections.Generic.List[psobject]]::new() +$failedTests = [System.Collections.Generic.List[psobject]]::new() +$unexecutedTests = [System.Collections.Generic.List[psobject]]::new() $totalErrors = 0 foreach ($file in $files) { @@ -32,7 +34,12 @@ foreach ($file in $files) { Skipped = [int]([math]::Round(($object | Measure-Object -Sum -Property SkippedCount).Sum)) } - $failed = ($result.Failed -gt 0) -or ($result.NotRun -gt 0) -or ($result.Inconclusive -gt 0) -or ($object.Result -eq 'Failed') -or ($object.Executed -eq $false) + $failed = ( + $result.Failed -gt 0 -or + $result.NotRun -gt 0 -or + $result.Inconclusive -gt 0 -or + $object.Result -eq 'Failed' -or $object.Executed -eq $false + ) $color = $failed ? $PSStyle.Foreground.Red : $PSStyle.Foreground.Green $reset = $PSStyle.Reset $logGroupName = $fileName.Replace('-TestResult-Report', '') @@ -40,11 +47,13 @@ foreach ($file in $files) { $result | Format-Table | Out-String if ($object.Result -eq 'Failed') { + $failedTests.Add($file) Write-GitHubError "Test result explicitly marked as Failed in file: $($file.Name)" $totalErrors++ } if ($object.Executed -eq $false) { + $unexecutedTests.Add($file) Write-GitHubError "Test was not executed as reported in file: $($file.Name)" $totalErrors++ } @@ -65,8 +74,7 @@ $failed = ( $total.Failed -gt 0 -or $total.NotRun -gt 0 -or $total.Inconclusive -gt 0 -or - $object.Executed -eq $false -or - $object.Result -eq 'Failed' + $totalErrors -gt 0 ) $color = $failed ? $PSStyle.Foreground.Red : $PSStyle.Foreground.Green $reset = $PSStyle.Reset @@ -89,4 +97,16 @@ if ($total.Inconclusive -gt 0) { $totalErrors += $total.Inconclusive } +if ($failedTests.Count -gt 0) { + LogGroup 'Failed Test Files' { + $failedTests.Name | Out-String + } +} + +if ($unexecutedTests.Count -gt 0) { + LogGroup 'Unexecuted Test Files' { + $unexecutedTests.Name | Out-String + } +} + exit $totalErrors From 84d0b03392e3a5a1f45cd81318c6c07e051ac4cc Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 22 Mar 2025 01:50:23 +0100 Subject: [PATCH 22/54] Refactor: Simplify output for failed and unexecuted test files by replacing LogGroup with Write-Host --- scripts/main.ps1 | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 19a574d..9681d6a 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -98,15 +98,13 @@ if ($total.Inconclusive -gt 0) { } if ($failedTests.Count -gt 0) { - LogGroup 'Failed Test Files' { - $failedTests.Name | Out-String - } + Write-Host 'Failed Test Files' + $failedTests.Name | Out-String } if ($unexecutedTests.Count -gt 0) { - LogGroup 'Unexecuted Test Files' { - $unexecutedTests.Name | Out-String - } + Write-Host 'Unexecuted Test Files' + $unexecutedTests.Name | Out-String } exit $totalErrors From 447dd4b4e6855e1fc2b636afb1fe6942359b0d30 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 22 Mar 2025 01:52:19 +0100 Subject: [PATCH 23/54] Refactor: Improve output formatting for failed and unexecuted test files by listing each test name --- scripts/main.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 9681d6a..bd4d161 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -99,12 +99,12 @@ if ($total.Inconclusive -gt 0) { if ($failedTests.Count -gt 0) { Write-Host 'Failed Test Files' - $failedTests.Name | Out-String + $failedTests.Name | ForEach-Object { Write-Host " - $_" } } if ($unexecutedTests.Count -gt 0) { Write-Host 'Unexecuted Test Files' - $unexecutedTests.Name | Out-String + $unexecutedTests.Name | ForEach-Object { Write-Host " - $_" } } exit $totalErrors From caad80c496ebbaf3c8d85791786c19be47ecabe2 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 22 Mar 2025 01:56:47 +0100 Subject: [PATCH 24/54] Refactor: Consolidate error handling and improve output for test results summary --- scripts/main.ps1 | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index bd4d161..d77a9f3 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -80,31 +80,30 @@ $color = $failed ? $PSStyle.Foreground.Red : $PSStyle.Foreground.Green $reset = $PSStyle.Reset LogGroup " - $color`Summary$reset" { $total | Format-Table | Out-String -} - -if ($total.Failed -gt 0) { - Write-GitHubError "There are $($total.Failed) failed tests of $($total.Tests) tests" - $totalErrors += $total.Failed -} + if ($total.Failed -gt 0) { + Write-GitHubError "There are $($total.Failed) failed tests of $($total.Tests) tests" + $totalErrors += $total.Failed + } -if ($total.NotRun -gt 0) { - Write-GitHubError "There are $($total.NotRun) tests not run of $($total.Tests) tests" - $totalErrors += $total.NotRun -} + if ($total.NotRun -gt 0) { + Write-GitHubError "There are $($total.NotRun) tests not run of $($total.Tests) tests" + $totalErrors += $total.NotRun + } -if ($total.Inconclusive -gt 0) { - Write-GitHubError "There are $($total.Inconclusive) inconclusive tests of $($total.Tests) tests" - $totalErrors += $total.Inconclusive -} + if ($total.Inconclusive -gt 0) { + Write-GitHubError "There are $($total.Inconclusive) inconclusive tests of $($total.Tests) tests" + $totalErrors += $total.Inconclusive + } -if ($failedTests.Count -gt 0) { - Write-Host 'Failed Test Files' - $failedTests.Name | ForEach-Object { Write-Host " - $_" } -} + if ($failedTests.Count -gt 0) { + Write-Host 'Failed Test Files' + $failedTests.Name | ForEach-Object { Write-Host " - $_" } + } -if ($unexecutedTests.Count -gt 0) { - Write-Host 'Unexecuted Test Files' - $unexecutedTests.Name | ForEach-Object { Write-Host " - $_" } + if ($unexecutedTests.Count -gt 0) { + Write-Host 'Unexecuted Test Files' + $unexecutedTests.Name | ForEach-Object { Write-Host " - $_" } + } } exit $totalErrors From 7aadee5b35e6fcff95a17bfc8be4376ca0d9178d Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 22 Mar 2025 02:05:16 +0100 Subject: [PATCH 25/54] Refactor: Reorder test result processing to handle unexecuted tests before failed tests --- scripts/main.ps1 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index d77a9f3..2f89a6a 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -44,18 +44,18 @@ foreach ($file in $files) { $reset = $PSStyle.Reset $logGroupName = $fileName.Replace('-TestResult-Report', '') LogGroup " - $color$logGroupName$reset" { - $result | Format-Table | Out-String - - if ($object.Result -eq 'Failed') { - $failedTests.Add($file) - Write-GitHubError "Test result explicitly marked as Failed in file: $($file.Name)" - $totalErrors++ - } - if ($object.Executed -eq $false) { $unexecutedTests.Add($file) Write-GitHubError "Test was not executed as reported in file: $($file.Name)" $totalErrors++ + } else { + if ($object.Result -eq 'Failed') { + $failedTests.Add($file) + Write-GitHubError "Test result explicitly marked as Failed in file: $($file.Name)" + $totalErrors++ + } + $result | Format-Table | Out-String + $object | Format-Table | Out-String } } } From e1d6572190c0c4a09701ec9694a19d14af643eb8 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 22 Mar 2025 02:08:33 +0100 Subject: [PATCH 26/54] Refactor: Add ShowInfo parameter to action.yml to control output verbosity --- action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/action.yml b/action.yml index d607870..a8ce75b 100644 --- a/action.yml +++ b/action.yml @@ -37,6 +37,7 @@ runs: Verbose: ${{ inputs.Verbose }} Version: ${{ inputs.Version }} WorkingDirectory: ${{ inputs.WorkingDirectory }} + ShowInfo: false Script: | # Get-PesterTestResults ${{ github.action_path }}/scripts/main.ps1 From 8be1366171633476bf0f1d84041f79c4ab6f0cd6 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 22 Mar 2025 02:13:01 +0100 Subject: [PATCH 27/54] Refactor: Change output formatting to use Format-List for better readability of test results --- scripts/main.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 2f89a6a..aa94e48 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -44,6 +44,7 @@ foreach ($file in $files) { $reset = $PSStyle.Reset $logGroupName = $fileName.Replace('-TestResult-Report', '') LogGroup " - $color$logGroupName$reset" { + $object | Format-List | Out-String if ($object.Executed -eq $false) { $unexecutedTests.Add($file) Write-GitHubError "Test was not executed as reported in file: $($file.Name)" @@ -55,7 +56,6 @@ foreach ($file in $files) { $totalErrors++ } $result | Format-Table | Out-String - $object | Format-Table | Out-String } } } From b4a5e4623d9cc446a5fc2ae76e81e4d6adf23ce3 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 23 Mar 2025 15:29:24 +0100 Subject: [PATCH 28/54] Refactor: Add input parameters for SourceCodeTestSuites, PSModuleTestSuites, and ModuleTestSuites in action.yml --- action.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index a8ce75b..e0f3723 100644 --- a/action.yml +++ b/action.yml @@ -6,6 +6,15 @@ branding: color: white inputs: + SourceCodeTestSuites: + description: The test suites to run for the source code. + required: true + PSModuleTestSuites: + description: The test suites to run for the PSModule. + required: true + ModuleTestSuites: + description: The test suites to run for the module. + required: true Debug: description: Enable debug output. required: false @@ -31,7 +40,12 @@ runs: steps: - name: Get-PesterTestResults uses: PSModule/GitHub-Script@v1 + env: + PSMODULE_GET_PESTERTESTRESULTS_INPUT_SourceCodeTestSuites: ${{ inputs.SourceCodeTestSuites }} + PSMODULE_GET_PESTERTESTRESULTS_INPUT_PSModuleTestSuites: ${{ inputs.PSModuleTestSuites }} + PSMODULE_GET_PESTERTESTRESULTS_INPUT_ModuleTestSuites: ${{ inputs.ModuleTestSuites }} with: + Name: Get-PesterTestResults Debug: ${{ inputs.Debug }} Prerelease: ${{ inputs.Prerelease }} Verbose: ${{ inputs.Verbose }} @@ -39,5 +53,4 @@ runs: WorkingDirectory: ${{ inputs.WorkingDirectory }} ShowInfo: false Script: | - # Get-PesterTestResults ${{ github.action_path }}/scripts/main.ps1 From 40fa088421f99a93dbd408314e66edae8ff8f04a Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 23 Mar 2025 16:28:16 +0100 Subject: [PATCH 29/54] Refactor: Add support for SourceCodeTestSuites, PSModuleTestSuites, and ModuleTestSuites in main.ps1 --- scripts/main.ps1 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index aa94e48..cf3be3a 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -6,6 +6,17 @@ param() $PSStyle.OutputRendering = 'Ansi' $repo = $env:GITHUB_REPOSITORY $runId = $env:GITHUB_RUN_ID + +$sourceCodeTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_SourceCodeTestSuites | ConvertFrom-Json +$psModuleTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_PSModuleTestSuites | ConvertFrom-Json +$moduleTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_ModuleTestSuites | ConvertFrom-Json + +[pscustomobject]@{ + SourceCodeTestSuites = $sourceCodeTestSuites + PSModuleTestSuites = $psModuleTestSuites + ModuleTestSuites = $moduleTestSuites +} | Format-List | Out-String + $testResultsFolder = New-Item -Path . -ItemType Directory -Name 'TestResults' -Force gh run download $runId --repo $repo --pattern *-TestResults --dir TestResults $files = Get-ChildItem -Path $testResultsFolder -Recurse -File -Filter *.json | Sort-Object Name From b330fec5d01f1c56a2173f25ba5b735ecd542a7e Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 23 Mar 2025 16:43:01 +0100 Subject: [PATCH 30/54] Refactor: Wrap test suite listing in LogGroup for better logging context --- scripts/main.ps1 | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index cf3be3a..172e25e 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -7,15 +7,17 @@ $PSStyle.OutputRendering = 'Ansi' $repo = $env:GITHUB_REPOSITORY $runId = $env:GITHUB_RUN_ID -$sourceCodeTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_SourceCodeTestSuites | ConvertFrom-Json -$psModuleTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_PSModuleTestSuites | ConvertFrom-Json -$moduleTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_ModuleTestSuites | ConvertFrom-Json - -[pscustomobject]@{ - SourceCodeTestSuites = $sourceCodeTestSuites - PSModuleTestSuites = $psModuleTestSuites - ModuleTestSuites = $moduleTestSuites -} | Format-List | Out-String +LogGroup 'List test suites' { + $sourceCodeTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_SourceCodeTestSuites | ConvertFrom-Json + $psModuleTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_PSModuleTestSuites | ConvertFrom-Json + $moduleTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_ModuleTestSuites | ConvertFrom-Json + + [pscustomobject]@{ + SourceCodeTestSuites = $sourceCodeTestSuites + PSModuleTestSuites = $psModuleTestSuites + ModuleTestSuites = $moduleTestSuites + } | Format-List | Out-String +} $testResultsFolder = New-Item -Path . -ItemType Directory -Name 'TestResults' -Force gh run download $runId --repo $repo --pattern *-TestResults --dir TestResults From 9ad597e207208b45bd3d9f7ee10620d8dd452344 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 23 Mar 2025 16:57:01 +0100 Subject: [PATCH 31/54] Refactor: Validate presence of expected artifact files and handle missing files --- scripts/main.ps1 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 172e25e..7959eb6 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -27,6 +27,30 @@ LogGroup 'List files' { $files.Name | Out-String } +# Validate that all expected artifact files are present. +$expectedFiles = @() + +# Expected files from SourceCodeTestSuites: files prefixed with 'SourceCode-' +foreach ($suite in $sourceCodeTestSuites) { + $expectedFiles += "SourceCode-$($suite.OSName)-TestResult-Report.json" +} +foreach ($suite in $psModuleTestSuites) { + $expectedFiles += "Module-$($suite.OSName)-TestResult-Report.json" +} +foreach ($suite in $moduleTestSuites) { + $expectedFiles += "$($suite.TestName)-$($suite.OSName)-TestResult-Report.json" +} + +# Remove any duplicates if present. +$expectedFiles = $expectedFiles | Select-Object -Unique + +# Check for missing files. +$missingFiles = $expectedFiles | Where-Object { $files.Name -notcontains $_ } +if ($missingFiles.Count -gt 0) { + Write-GitHubError "Missing expected test result files: $($missingFiles -join ', ')" + exit 1 +} + $testResults = [System.Collections.Generic.List[psobject]]::new() $failedTests = [System.Collections.Generic.List[psobject]]::new() $unexecutedTests = [System.Collections.Generic.List[psobject]]::new() From 52e6e642234339aefa1552f8500de66591d7fcee Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 23 Mar 2025 17:06:20 +0100 Subject: [PATCH 32/54] Refactor: Enhance expected test suite validation and improve error handling for missing result files --- scripts/main.ps1 | 155 ++++++++++++++++++++++++++--------------------- 1 file changed, 87 insertions(+), 68 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 7959eb6..0ae3792 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -7,18 +7,6 @@ $PSStyle.OutputRendering = 'Ansi' $repo = $env:GITHUB_REPOSITORY $runId = $env:GITHUB_RUN_ID -LogGroup 'List test suites' { - $sourceCodeTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_SourceCodeTestSuites | ConvertFrom-Json - $psModuleTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_PSModuleTestSuites | ConvertFrom-Json - $moduleTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_ModuleTestSuites | ConvertFrom-Json - - [pscustomobject]@{ - SourceCodeTestSuites = $sourceCodeTestSuites - PSModuleTestSuites = $psModuleTestSuites - ModuleTestSuites = $moduleTestSuites - } | Format-List | Out-String -} - $testResultsFolder = New-Item -Path . -ItemType Directory -Name 'TestResults' -Force gh run download $runId --repo $repo --pattern *-TestResults --dir TestResults $files = Get-ChildItem -Path $testResultsFolder -Recurse -File -Filter *.json | Sort-Object Name @@ -27,28 +15,48 @@ LogGroup 'List files' { $files.Name | Out-String } -# Validate that all expected artifact files are present. -$expectedFiles = @() +LogGroup 'Expected test suites' { + $sourceCodeTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_SourceCodeTestSuites | ConvertFrom-Json + $psModuleTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_PSModuleTestSuites | ConvertFrom-Json + $moduleTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_ModuleTestSuites | ConvertFrom-Json + +# Build an array of expected test suite objects +$expectedTestSuites = @() -# Expected files from SourceCodeTestSuites: files prefixed with 'SourceCode-' +# SourceCodeTestSuites: expected file names start with "SourceCode-" foreach ($suite in $sourceCodeTestSuites) { - $expectedFiles += "SourceCode-$($suite.OSName)-TestResult-Report.json" + $expectedTestSuites += [pscustomobject]@{ + FileName = "SourceCode-$($suite.OSName)-TestResult-Report.json" + Category = 'SourceCode' + OSName = $suite.OSName + TestName = $null + } } + +# PSModuleTestSuites: expected file names start with "Module-" foreach ($suite in $psModuleTestSuites) { - $expectedFiles += "Module-$($suite.OSName)-TestResult-Report.json" + $expectedTestSuites += [pscustomobject]@{ + FileName = "Module-$($suite.OSName)-TestResult-Report.json" + Category = 'PSModuleTest' + OSName = $suite.OSName + TestName = $null + } } + +# ModuleTestSuites: expected file names use the TestName as prefix foreach ($suite in $moduleTestSuites) { - $expectedFiles += "$($suite.TestName)-$($suite.OSName)-TestResult-Report.json" + $expectedTestSuites += [pscustomobject]@{ + FileName = "$($suite.TestName)-$($suite.OSName)-TestResult-Report.json" + Category = 'ModuleTest' + OSName = $suite.OSName + TestName = $suite.TestName + } } -# Remove any duplicates if present. -$expectedFiles = $expectedFiles | Select-Object -Unique +# Remove duplicates if any +$expectedTestSuites = $expectedTestSuites | Select-Object -Unique -# Check for missing files. -$missingFiles = $expectedFiles | Where-Object { $files.Name -notcontains $_ } -if ($missingFiles.Count -gt 0) { - Write-GitHubError "Missing expected test result files: $($missingFiles -join ', ')" - exit 1 + $expectedTestSuites | Format-Table | Out-String } $testResults = [System.Collections.Generic.List[psobject]]::new() @@ -56,45 +64,65 @@ $failedTests = [System.Collections.Generic.List[psobject]]::new() $unexecutedTests = [System.Collections.Generic.List[psobject]]::new() $totalErrors = 0 -foreach ($file in $files) { - $fileName = $file.BaseName - $content = Get-Content -Path $file - $object = $content | ConvertFrom-Json - $testResults.Add($object) - - $result = [pscustomobject]@{ - Tests = [int]([math]::Round(($object | Measure-Object -Sum -Property TotalCount).Sum)) - Passed = [int]([math]::Round(($object | Measure-Object -Sum -Property PassedCount).Sum)) - Failed = [int]([math]::Round(($object | Measure-Object -Sum -Property FailedCount).Sum)) - NotRun = [int]([math]::Round(($object | Measure-Object -Sum -Property NotRunCount).Sum)) - Inconclusive = [int]([math]::Round(($object | Measure-Object -Sum -Property InconclusiveCount).Sum)) - Skipped = [int]([math]::Round(($object | Measure-Object -Sum -Property SkippedCount).Sum)) +foreach ($expected in $expectedTestSuites) { + $filePath = Join-Path $testResultsFolder.FullName $expected.FileName + if (Test-Path $filePath) { + $content = Get-Content -Path $filePath + $object = $content | ConvertFrom-Json + $result = [pscustomobject]@{ + Tests = [int]([math]::Round(($object | Measure-Object -Sum -Property TotalCount).Sum)) + Passed = [int]([math]::Round(($object | Measure-Object -Sum -Property PassedCount).Sum)) + Failed = [int]([math]::Round(($object | Measure-Object -Sum -Property FailedCount).Sum)) + NotRun = [int]([math]::Round(($object | Measure-Object -Sum -Property NotRunCount).Sum)) + Inconclusive = [int]([math]::Round(($object | Measure-Object -Sum -Property InconclusiveCount).Sum)) + Skipped = [int]([math]::Round(($object | Measure-Object -Sum -Property SkippedCount).Sum)) + ResultFilePresent = $true + } + } else { + $result = [pscustomobject]@{ + Tests = $null + Passed = $null + Failed = $null + NotRun = $null + Inconclusive = $null + Skipped = $null + ResultFilePresent = $false + } + Write-GitHubError "Missing expected test result file: $($expected.FileName)" + $totalErrors++ } - $failed = ( - $result.Failed -gt 0 -or - $result.NotRun -gt 0 -or - $result.Inconclusive -gt 0 -or - $object.Result -eq 'Failed' -or $object.Executed -eq $false - ) - $color = $failed ? $PSStyle.Foreground.Red : $PSStyle.Foreground.Green + # Determine if there’s any failure: missing file or non-successful test counts + $isFailure = ($result.ResultFilePresent -eq $false) -or + ($result.Failed -gt 0) -or + ($result.NotRun -gt 0) -or + ($result.Inconclusive -gt 0) + $color = $isFailure ? $PSStyle.Foreground.Red : $PSStyle.Foreground.Green $reset = $PSStyle.Reset - $logGroupName = $fileName.Replace('-TestResult-Report', '') + $logGroupName = $expected.FileName -replace '-TestResult-Report', '' + LogGroup " - $color$logGroupName$reset" { - $object | Format-List | Out-String - if ($object.Executed -eq $false) { - $unexecutedTests.Add($file) - Write-GitHubError "Test was not executed as reported in file: $($file.Name)" - $totalErrors++ - } else { - if ($object.Result -eq 'Failed') { - $failedTests.Add($file) - Write-GitHubError "Test result explicitly marked as Failed in file: $($file.Name)" + if ($result.ResultFilePresent) { + # Output detailed results from the file. + $object | Format-List | Out-String + if ($object.Executed -eq $false) { + $unexecutedTests.Add($expected.FileName) + Write-GitHubError "Test was not executed as reported in file: $($expected.FileName)" + $totalErrors++ + } elseif ($object.Result -eq 'Failed') { + $failedTests.Add($expected.FileName) + Write-GitHubError "Test result explicitly marked as Failed in file: $($expected.FileName)" $totalErrors++ } $result | Format-Table | Out-String + } else { + Write-Host "Test result file not found for: $($expected.FileName)" } } + + if ($result.ResultFilePresent) { + $testResults.Add($object) + } } Write-Output ('─' * 50) @@ -107,13 +135,8 @@ $total = [pscustomobject]@{ Skipped = [int]([math]::Round(($testResults | Measure-Object -Sum -Property SkippedCount).Sum)) } -$failed = ( - $total.Failed -gt 0 -or - $total.NotRun -gt 0 -or - $total.Inconclusive -gt 0 -or - $totalErrors -gt 0 -) -$color = $failed ? $PSStyle.Foreground.Red : $PSStyle.Foreground.Green +$overallFailure = ($total.Failed -gt 0) -or ($total.NotRun -gt 0) -or ($total.Inconclusive -gt 0) -or ($totalErrors -gt 0) +$color = $overallFailure ? $PSStyle.Foreground.Red : $PSStyle.Foreground.Green $reset = $PSStyle.Reset LogGroup " - $color`Summary$reset" { $total | Format-Table | Out-String @@ -121,25 +144,21 @@ LogGroup " - $color`Summary$reset" { Write-GitHubError "There are $($total.Failed) failed tests of $($total.Tests) tests" $totalErrors += $total.Failed } - if ($total.NotRun -gt 0) { Write-GitHubError "There are $($total.NotRun) tests not run of $($total.Tests) tests" $totalErrors += $total.NotRun } - if ($total.Inconclusive -gt 0) { Write-GitHubError "There are $($total.Inconclusive) inconclusive tests of $($total.Tests) tests" $totalErrors += $total.Inconclusive } - if ($failedTests.Count -gt 0) { Write-Host 'Failed Test Files' - $failedTests.Name | ForEach-Object { Write-Host " - $_" } + $failedTests | ForEach-Object { Write-Host " - $_" } } - if ($unexecutedTests.Count -gt 0) { Write-Host 'Unexecuted Test Files' - $unexecutedTests.Name | ForEach-Object { Write-Host " - $_" } + $unexecutedTests | ForEach-Object { Write-Host " - $_" } } } From c6c17566c921676b3742a22f89a18455981db937 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 23 Mar 2025 17:18:45 +0100 Subject: [PATCH 33/54] Refactor: Improve logging and structure for expected test suites in main.ps1 --- scripts/main.ps1 | 77 +++++++++++++++++++++++++++--------------------- 1 file changed, 43 insertions(+), 34 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 0ae3792..586e225 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -15,46 +15,55 @@ LogGroup 'List files' { $files.Name | Out-String } -LogGroup 'Expected test suites' { - $sourceCodeTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_SourceCodeTestSuites | ConvertFrom-Json - $psModuleTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_PSModuleTestSuites | ConvertFrom-Json - $moduleTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_ModuleTestSuites | ConvertFrom-Json - -# Build an array of expected test suite objects -$expectedTestSuites = @() - -# SourceCodeTestSuites: expected file names start with "SourceCode-" -foreach ($suite in $sourceCodeTestSuites) { - $expectedTestSuites += [pscustomobject]@{ - FileName = "SourceCode-$($suite.OSName)-TestResult-Report.json" - Category = 'SourceCode' - OSName = $suite.OSName - TestName = $null - } +$sourceCodeTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_SourceCodeTestSuites | ConvertFrom-Json +LogGroup 'SourceCode test suites' { + $sourceCodeTestSuites | Format-Table | Out-String } -# PSModuleTestSuites: expected file names start with "Module-" -foreach ($suite in $psModuleTestSuites) { - $expectedTestSuites += [pscustomobject]@{ - FileName = "Module-$($suite.OSName)-TestResult-Report.json" - Category = 'PSModuleTest' - OSName = $suite.OSName - TestName = $null - } +$psModuleTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_PSModuleTestSuites | ConvertFrom-Json +LogGroup 'PSModule test suites' { + $psModuleTestSuites | Format-Table | Out-String } -# ModuleTestSuites: expected file names use the TestName as prefix -foreach ($suite in $moduleTestSuites) { - $expectedTestSuites += [pscustomobject]@{ - FileName = "$($suite.TestName)-$($suite.OSName)-TestResult-Report.json" - Category = 'ModuleTest' - OSName = $suite.OSName - TestName = $suite.TestName - } +$moduleTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_ModuleTestSuites | ConvertFrom-Json +LogGroup 'Module test suites' { + $moduleTestSuites | Format-Table | Out-String } -# Remove duplicates if any -$expectedTestSuites = $expectedTestSuites | Select-Object -Unique +LogGroup 'Expected test suites' { + + # Build an array of expected test suite objects + $expectedTestSuites = @() + + # SourceCodeTestSuites: expected file names start with "SourceCode-" + foreach ($suite in $sourceCodeTestSuites) { + $expectedTestSuites += [pscustomobject]@{ + FileName = "SourceCode-$($suite.OSName)-TestResult-Report.json" + Category = 'SourceCode' + OSName = $suite.OSName + TestName = $null + } + } + + # PSModuleTestSuites: expected file names start with "Module-" + foreach ($suite in $psModuleTestSuites) { + $expectedTestSuites += [pscustomobject]@{ + FileName = "Module-$($suite.OSName)-TestResult-Report.json" + Category = 'PSModuleTest' + OSName = $suite.OSName + TestName = $null + } + } + + # ModuleTestSuites: expected file names use the TestName as prefix + foreach ($suite in $moduleTestSuites) { + $expectedTestSuites += [pscustomobject]@{ + FileName = "$($suite.TestName)-$($suite.OSName)-TestResult-Report.json" + Category = 'ModuleTest' + OSName = $suite.OSName + TestName = $suite.TestName + } + } $expectedTestSuites | Format-Table | Out-String } From 6235e4627ce71c61b44b76470880a274fba9ae09 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 23 Mar 2025 17:51:07 +0100 Subject: [PATCH 34/54] Refactor: Simplify test suite logging and improve file validation logic in main.ps1 --- scripts/main.ps1 | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 586e225..7cb75b2 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -16,19 +16,8 @@ LogGroup 'List files' { } $sourceCodeTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_SourceCodeTestSuites | ConvertFrom-Json -LogGroup 'SourceCode test suites' { - $sourceCodeTestSuites | Format-Table | Out-String -} - $psModuleTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_PSModuleTestSuites | ConvertFrom-Json -LogGroup 'PSModule test suites' { - $psModuleTestSuites | Format-Table | Out-String -} - $moduleTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_ModuleTestSuites | ConvertFrom-Json -LogGroup 'Module test suites' { - $moduleTestSuites | Format-Table | Out-String -} LogGroup 'Expected test suites' { @@ -74,10 +63,9 @@ $unexecutedTests = [System.Collections.Generic.List[psobject]]::new() $totalErrors = 0 foreach ($expected in $expectedTestSuites) { - $filePath = Join-Path $testResultsFolder.FullName $expected.FileName - if (Test-Path $filePath) { - $content = Get-Content -Path $filePath - $object = $content | ConvertFrom-Json + $file = $files | Where-Object { $_.Name -eq $expected.FileName } + if ($file) { + $object = $file | Get-Content | ConvertFrom-Json $result = [pscustomobject]@{ Tests = [int]([math]::Round(($object | Measure-Object -Sum -Property TotalCount).Sum)) Passed = [int]([math]::Round(($object | Measure-Object -Sum -Property PassedCount).Sum)) @@ -97,7 +85,6 @@ foreach ($expected in $expectedTestSuites) { Skipped = $null ResultFilePresent = $false } - Write-GitHubError "Missing expected test result file: $($expected.FileName)" $totalErrors++ } From b9a025fe9afb9a7e17abb98e32a6c31835b1eb06 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 23 Mar 2025 18:05:44 +0100 Subject: [PATCH 35/54] Refactor: Rename expected test suite file properties for consistency and clarity --- scripts/main.ps1 | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 7cb75b2..e065c54 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -27,7 +27,7 @@ LogGroup 'Expected test suites' { # SourceCodeTestSuites: expected file names start with "SourceCode-" foreach ($suite in $sourceCodeTestSuites) { $expectedTestSuites += [pscustomobject]@{ - FileName = "SourceCode-$($suite.OSName)-TestResult-Report.json" + Name = "SourceCode-$($suite.OSName)-TestResult-Report" Category = 'SourceCode' OSName = $suite.OSName TestName = $null @@ -37,7 +37,7 @@ LogGroup 'Expected test suites' { # PSModuleTestSuites: expected file names start with "Module-" foreach ($suite in $psModuleTestSuites) { $expectedTestSuites += [pscustomobject]@{ - FileName = "Module-$($suite.OSName)-TestResult-Report.json" + Name = "Module-$($suite.OSName)-TestResult-Report" Category = 'PSModuleTest' OSName = $suite.OSName TestName = $null @@ -47,7 +47,7 @@ LogGroup 'Expected test suites' { # ModuleTestSuites: expected file names use the TestName as prefix foreach ($suite in $moduleTestSuites) { $expectedTestSuites += [pscustomobject]@{ - FileName = "$($suite.TestName)-$($suite.OSName)-TestResult-Report.json" + Name = "$($suite.TestName)-$($suite.OSName)-TestResult-Report" Category = 'ModuleTest' OSName = $suite.OSName TestName = $suite.TestName @@ -63,7 +63,7 @@ $unexecutedTests = [System.Collections.Generic.List[psobject]]::new() $totalErrors = 0 foreach ($expected in $expectedTestSuites) { - $file = $files | Where-Object { $_.Name -eq $expected.FileName } + $file = $files | Where-Object { $_.BaseName -eq $expected.Name } if ($file) { $object = $file | Get-Content | ConvertFrom-Json $result = [pscustomobject]@{ @@ -95,24 +95,24 @@ foreach ($expected in $expectedTestSuites) { ($result.Inconclusive -gt 0) $color = $isFailure ? $PSStyle.Foreground.Red : $PSStyle.Foreground.Green $reset = $PSStyle.Reset - $logGroupName = $expected.FileName -replace '-TestResult-Report', '' + $logGroupName = $expected.Name -replace '-TestResult-Report.*', '' LogGroup " - $color$logGroupName$reset" { if ($result.ResultFilePresent) { # Output detailed results from the file. $object | Format-List | Out-String if ($object.Executed -eq $false) { - $unexecutedTests.Add($expected.FileName) - Write-GitHubError "Test was not executed as reported in file: $($expected.FileName)" + $unexecutedTests.Add($expected.Name) + Write-GitHubError "Test was not executed as reported in file: $($expected.Name)" $totalErrors++ } elseif ($object.Result -eq 'Failed') { - $failedTests.Add($expected.FileName) - Write-GitHubError "Test result explicitly marked as Failed in file: $($expected.FileName)" + $failedTests.Add($expected.Name) + Write-GitHubError "Test result explicitly marked as Failed in file: $($expected.Name)" $totalErrors++ } $result | Format-Table | Out-String } else { - Write-Host "Test result file not found for: $($expected.FileName)" + Write-Host "Test result file not found for: $($expected.Name)" } } From e84daa1ab0bef74974970824f320b8e654d6d7af Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 23 Mar 2025 18:09:43 +0100 Subject: [PATCH 36/54] Refactor: Update expected test suite naming conventions for consistency and clarity --- scripts/main.ps1 | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index e065c54..0d14381 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -27,7 +27,13 @@ LogGroup 'Expected test suites' { # SourceCodeTestSuites: expected file names start with "SourceCode-" foreach ($suite in $sourceCodeTestSuites) { $expectedTestSuites += [pscustomobject]@{ - Name = "SourceCode-$($suite.OSName)-TestResult-Report" + Name = "PSModuleTest-SourceCode-$($suite.OSName)-TestResult-Report" + Category = 'SourceCode' + OSName = $suite.OSName + TestName = $null + } + $expectedTestSuites += [pscustomobject]@{ + Name = "PSModuleLint-SourceCode-$($suite.OSName)-TestResult-Report" Category = 'SourceCode' OSName = $suite.OSName TestName = $null @@ -37,7 +43,13 @@ LogGroup 'Expected test suites' { # PSModuleTestSuites: expected file names start with "Module-" foreach ($suite in $psModuleTestSuites) { $expectedTestSuites += [pscustomobject]@{ - Name = "Module-$($suite.OSName)-TestResult-Report" + Name = "PSModuleTest-Module-$($suite.OSName)-TestResult-Report" + Category = 'PSModuleTest' + OSName = $suite.OSName + TestName = $null + } + $expectedTestSuites += [pscustomobject]@{ + Name = "PSModuleLint-Module-$($suite.OSName)-TestResult-Report" Category = 'PSModuleTest' OSName = $suite.OSName TestName = $null From 097c73887380d24ffa13207ddeca3e510a612f95 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 23 Mar 2025 18:11:12 +0100 Subject: [PATCH 37/54] Refactor: Sort test suite inputs by name for improved consistency and readability --- scripts/main.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 0d14381..6c06cd6 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -15,9 +15,9 @@ LogGroup 'List files' { $files.Name | Out-String } -$sourceCodeTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_SourceCodeTestSuites | ConvertFrom-Json -$psModuleTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_PSModuleTestSuites | ConvertFrom-Json -$moduleTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_ModuleTestSuites | ConvertFrom-Json +$sourceCodeTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_SourceCodeTestSuites | ConvertFrom-Json | Sort-Object Name +$psModuleTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_PSModuleTestSuites | ConvertFrom-Json | Sort-Object Name +$moduleTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_ModuleTestSuites | ConvertFrom-Json | Sort-Object Name LogGroup 'Expected test suites' { From 09c20c204054f25c68b9d51710b68daadf08f230 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 23 Mar 2025 19:09:23 +0100 Subject: [PATCH 38/54] Refactor: Streamline test suite input processing and enhance failure condition checks --- scripts/main.ps1 | 60 ++++++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 28 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 6c06cd6..f4d1da3 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -15,9 +15,9 @@ LogGroup 'List files' { $files.Name | Out-String } -$sourceCodeTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_SourceCodeTestSuites | ConvertFrom-Json | Sort-Object Name -$psModuleTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_PSModuleTestSuites | ConvertFrom-Json | Sort-Object Name -$moduleTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_ModuleTestSuites | ConvertFrom-Json | Sort-Object Name +$sourceCodeTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_SourceCodeTestSuites | ConvertFrom-Json +$psModuleTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_PSModuleTestSuites | ConvertFrom-Json +$moduleTestSuites = $env:PSMODULE_GET_PESTERTESTRESULTS_INPUT_ModuleTestSuites | ConvertFrom-Json LogGroup 'Expected test suites' { @@ -66,6 +66,7 @@ LogGroup 'Expected test suites' { } } + $expectedTestSuites = $expectedTestSuites | Sort-Object Name $expectedTestSuites | Format-Table | Out-String } @@ -76,56 +77,59 @@ $totalErrors = 0 foreach ($expected in $expectedTestSuites) { $file = $files | Where-Object { $_.BaseName -eq $expected.Name } - if ($file) { + $result = if ($file) { $object = $file | Get-Content | ConvertFrom-Json - $result = [pscustomobject]@{ + [pscustomobject]@{ + Result = $object.Result + Executed = $object.Executed + ResultFilePresent = $true Tests = [int]([math]::Round(($object | Measure-Object -Sum -Property TotalCount).Sum)) Passed = [int]([math]::Round(($object | Measure-Object -Sum -Property PassedCount).Sum)) Failed = [int]([math]::Round(($object | Measure-Object -Sum -Property FailedCount).Sum)) NotRun = [int]([math]::Round(($object | Measure-Object -Sum -Property NotRunCount).Sum)) Inconclusive = [int]([math]::Round(($object | Measure-Object -Sum -Property InconclusiveCount).Sum)) Skipped = [int]([math]::Round(($object | Measure-Object -Sum -Property SkippedCount).Sum)) - ResultFilePresent = $true } } else { - $result = [pscustomobject]@{ + [pscustomobject]@{ + Result = $null + Executed = $null + ResultFilePresent = $false Tests = $null Passed = $null Failed = $null NotRun = $null Inconclusive = $null Skipped = $null - ResultFilePresent = $false } - $totalErrors++ } # Determine if there’s any failure: missing file or non-successful test counts - $isFailure = ($result.ResultFilePresent -eq $false) -or - ($result.Failed -gt 0) -or - ($result.NotRun -gt 0) -or - ($result.Inconclusive -gt 0) + $isFailure = ( + $result.Result -ne 'Passed' -or + $result.Executed -ne $true -or + $result.ResultFilePresent -eq $false -or + $result.Tests -eq 0 -or + $result.Passed -eq 0 -or + $result.Failed -gt 0 -or + $result.NotRun -gt 0 -or + $result.Inconclusive -gt 0 + ) $color = $isFailure ? $PSStyle.Foreground.Red : $PSStyle.Foreground.Green $reset = $PSStyle.Reset $logGroupName = $expected.Name -replace '-TestResult-Report.*', '' LogGroup " - $color$logGroupName$reset" { - if ($result.ResultFilePresent) { - # Output detailed results from the file. - $object | Format-List | Out-String - if ($object.Executed -eq $false) { - $unexecutedTests.Add($expected.Name) - Write-GitHubError "Test was not executed as reported in file: $($expected.Name)" - $totalErrors++ - } elseif ($object.Result -eq 'Failed') { - $failedTests.Add($expected.Name) - Write-GitHubError "Test result explicitly marked as Failed in file: $($expected.Name)" - $totalErrors++ - } - $result | Format-Table | Out-String - } else { - Write-Host "Test result file not found for: $($expected.Name)" + if ($object.Executed -eq $false) { + $unexecutedTests.Add($expected.Name) + Write-GitHubError "Test was not executed as reported in file: $($expected.Name)" + $totalErrors++ + } elseif ($object.Result -eq 'Failed') { + $failedTests.Add($expected.Name) + Write-GitHubError "Test result explicitly marked as Failed in file: $($expected.Name)" + $totalErrors++ } + $result | Format-Table | Out-String } if ($result.ResultFilePresent) { From 49f304ae1c05ea815352dd7f488402a03cfddafc Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Mon, 24 Mar 2025 19:34:38 +0100 Subject: [PATCH 39/54] Refactor: Sort expected test suites by category and name for improved organization --- scripts/main.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index f4d1da3..e2ade52 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -66,7 +66,7 @@ LogGroup 'Expected test suites' { } } - $expectedTestSuites = $expectedTestSuites | Sort-Object Name + $expectedTestSuites = $expectedTestSuites | Sort-Object Category, Name $expectedTestSuites | Format-Table | Out-String } From 4d131118517209a40d6763f15105e55e60d08f23 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 30 Mar 2025 23:11:52 +0200 Subject: [PATCH 40/54] Refactor: Enhance artifact download process by using GitHub API for improved reliability and organization --- scripts/main.ps1 | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index e2ade52..c66d962 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -8,7 +8,24 @@ $repo = $env:GITHUB_REPOSITORY $runId = $env:GITHUB_RUN_ID $testResultsFolder = New-Item -Path . -ItemType Directory -Name 'TestResults' -Force -gh run download $runId --repo $repo --pattern *-TestResults --dir TestResults +$response = Invoke-GitHubAPI -ApiEndpoint "/repos/$repo/actions/runs/$runId/artifacts" +$artifacts = $response.Response.artifacts | Sort-Object -Property created_at -Descending | Group-Object -Property name | ForEach-Object { + $_.Group | Select-Object -First 1 +} +$testResultArtifacts = $artifacts | Where-Object { $_.name -like '*-TestResults' } +Write-Output "$($testResultArtifacts | Format-Table | Out-String)" + +foreach ($artifact in $testResultArtifacts) { + if ($artifact.name -like '*-TestResults') { + $url = $artifact.archive_download_url + $zipFile = Join-Path -Path $testResultsFolder.FullName -ChildPath "$($artifact.name).zip" + Write-Output "Downloading artifact [$($artifact.name)] to [$zipFile]" + Invoke-WebRequest -Uri $url -OutFile $zipFile + Write-Output "Unzipping [$zipFile] to [$testResultsFolder]" + Expand-Archive -Path $zipFile -DestinationPath $testResultsFolder.FullName -Force + } +} + $files = Get-ChildItem -Path $testResultsFolder -Recurse -File -Filter *.json | Sort-Object Name LogGroup 'List files' { From de154a4986fb9819dbb812233def45e280f7154a Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 30 Mar 2025 23:16:30 +0200 Subject: [PATCH 41/54] Refactor: Improve artifact download process by adding authentication and cleaning up temporary files --- scripts/main.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index c66d962..7b55a6d 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -6,6 +6,7 @@ param() $PSStyle.OutputRendering = 'Ansi' $repo = $env:GITHUB_REPOSITORY $runId = $env:GITHUB_RUN_ID +$context = Get-GitHubContext $testResultsFolder = New-Item -Path . -ItemType Directory -Name 'TestResults' -Force $response = Invoke-GitHubAPI -ApiEndpoint "/repos/$repo/actions/runs/$runId/artifacts" @@ -20,9 +21,10 @@ foreach ($artifact in $testResultArtifacts) { $url = $artifact.archive_download_url $zipFile = Join-Path -Path $testResultsFolder.FullName -ChildPath "$($artifact.name).zip" Write-Output "Downloading artifact [$($artifact.name)] to [$zipFile]" - Invoke-WebRequest -Uri $url -OutFile $zipFile + Invoke-WebRequest -Uri $url -OutFile $zipFile -Token ($context.Token) -Authentication Bearer Write-Output "Unzipping [$zipFile] to [$testResultsFolder]" Expand-Archive -Path $zipFile -DestinationPath $testResultsFolder.FullName -Force + Remove-Item -Path $zipFile -Force } } From f250d13f514fb72a86d33bf1c15b81001779cd8f Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 30 Mar 2025 23:23:41 +0200 Subject: [PATCH 42/54] Refactor: Update artifact output to include additional properties and streamline extraction process --- scripts/main.ps1 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 7b55a6d..e8e65d6 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -14,7 +14,7 @@ $artifacts = $response.Response.artifacts | Sort-Object -Property created_at -De $_.Group | Select-Object -First 1 } $testResultArtifacts = $artifacts | Where-Object { $_.name -like '*-TestResults' } -Write-Output "$($testResultArtifacts | Format-Table | Out-String)" +Write-Output "$($testResultArtifacts | Select-Object -Property name, size_in_bytes, updated_at, archive_download_url | Format-Table | Out-String)" foreach ($artifact in $testResultArtifacts) { if ($artifact.name -like '*-TestResults') { @@ -23,8 +23,7 @@ foreach ($artifact in $testResultArtifacts) { Write-Output "Downloading artifact [$($artifact.name)] to [$zipFile]" Invoke-WebRequest -Uri $url -OutFile $zipFile -Token ($context.Token) -Authentication Bearer Write-Output "Unzipping [$zipFile] to [$testResultsFolder]" - Expand-Archive -Path $zipFile -DestinationPath $testResultsFolder.FullName -Force - Remove-Item -Path $zipFile -Force + $zipFile | Expand-Archive - } } From 0ce62a5eb361ceb6a51687ce121ae17bed13a81f Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Mon, 31 Mar 2025 01:13:20 +0200 Subject: [PATCH 43/54] Refactor: Improve artifact extraction process by ensuring proper unzipping and cleanup of temporary files --- scripts/main.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index e8e65d6..cbe7a5b 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -23,7 +23,8 @@ foreach ($artifact in $testResultArtifacts) { Write-Output "Downloading artifact [$($artifact.name)] to [$zipFile]" Invoke-WebRequest -Uri $url -OutFile $zipFile -Token ($context.Token) -Authentication Bearer Write-Output "Unzipping [$zipFile] to [$testResultsFolder]" - $zipFile | Expand-Archive - + Expand-Archive -Path $zipFile -DestinationPath $testResultsFolder.FullName -Force + Remove-Item -Path $zipFile -Force } } From ecbef6a95ce798f307858fcde851cf7fa94a22fc Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Wed, 2 Apr 2025 20:47:22 +0200 Subject: [PATCH 44/54] Refactor: Simplify test result evaluation and improve failure handling in test suite logging --- scripts/main.ps1 | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index cbe7a5b..b3b5b59 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -88,6 +88,7 @@ LogGroup 'Expected test suites' { $expectedTestSuites = $expectedTestSuites | Sort-Object Category, Name $expectedTestSuites | Format-Table | Out-String } +$isFailure = $false $testResults = [System.Collections.Generic.List[psobject]]::new() $failedTests = [System.Collections.Generic.List[psobject]]::new() @@ -123,27 +124,36 @@ foreach ($expected in $expectedTestSuites) { } } - # Determine if there’s any failure: missing file or non-successful test counts - $isFailure = ( + # Determine if there’s any failure for this single test file + $testFailure = ( $result.Result -ne 'Passed' -or $result.Executed -ne $true -or $result.ResultFilePresent -eq $false -or $result.Tests -eq 0 -or $result.Passed -eq 0 -or $result.Failed -gt 0 -or - $result.NotRun -gt 0 -or $result.Inconclusive -gt 0 ) - $color = $isFailure ? $PSStyle.Foreground.Red : $PSStyle.Foreground.Green + + if ($testFailure) { + $conclusion = 'Failed' + $color = $PSStyle.Foreground.Red + $isFailure = $true + } else { + $conclusion = 'Passed' + $color = $PSStyle.Foreground.Green + } + $result | Add-Member -NotePropertyName 'Conclusion' -NotePropertyValue $conclusion + $reset = $PSStyle.Reset $logGroupName = $expected.Name -replace '-TestResult-Report.*', '' LogGroup " - $color$logGroupName$reset" { - if ($object.Executed -eq $false) { + if ($result.Executed -eq $false) { $unexecutedTests.Add($expected.Name) Write-GitHubError "Test was not executed as reported in file: $($expected.Name)" $totalErrors++ - } elseif ($object.Result -eq 'Failed') { + } elseif ($result.Result -eq 'Failed') { $failedTests.Add($expected.Name) Write-GitHubError "Test result explicitly marked as Failed in file: $($expected.Name)" $totalErrors++ @@ -152,22 +162,22 @@ foreach ($expected in $expectedTestSuites) { } if ($result.ResultFilePresent) { - $testResults.Add($object) + $testResults.Add($result) } } Write-Output ('─' * 50) $total = [pscustomobject]@{ - Tests = [int]([math]::Round(($testResults | Measure-Object -Sum -Property TotalCount).Sum)) - Passed = [int]([math]::Round(($testResults | Measure-Object -Sum -Property PassedCount).Sum)) - Failed = [int]([math]::Round(($testResults | Measure-Object -Sum -Property FailedCount).Sum)) - NotRun = [int]([math]::Round(($testResults | Measure-Object -Sum -Property NotRunCount).Sum)) - Inconclusive = [int]([math]::Round(($testResults | Measure-Object -Sum -Property InconclusiveCount).Sum)) - Skipped = [int]([math]::Round(($testResults | Measure-Object -Sum -Property SkippedCount).Sum)) + Tests = [int]([math]::Round(($testResults | Measure-Object -Sum -Property Tests).Sum)) + Passed = [int]([math]::Round(($testResults | Measure-Object -Sum -Property Passed).Sum)) + Failed = [int]([math]::Round(($testResults | Measure-Object -Sum -Property Failed).Sum)) + NotRun = [int]([math]::Round(($testResults | Measure-Object -Sum -Property NotRun).Sum)) + Inconclusive = [int]([math]::Round(($testResults | Measure-Object -Sum -Property Inconclusive).Sum)) + Skipped = [int]([math]::Round(($testResults | Measure-Object -Sum -Property Skipped).Sum)) } -$overallFailure = ($total.Failed -gt 0) -or ($total.NotRun -gt 0) -or ($total.Inconclusive -gt 0) -or ($totalErrors -gt 0) -$color = $overallFailure ? $PSStyle.Foreground.Red : $PSStyle.Foreground.Green + +$color = if ($isFailure) { $PSStyle.Foreground.Red } else { $PSStyle.Foreground.Green } $reset = $PSStyle.Reset LogGroup " - $color`Summary$reset" { $total | Format-Table | Out-String @@ -175,10 +185,6 @@ LogGroup " - $color`Summary$reset" { Write-GitHubError "There are $($total.Failed) failed tests of $($total.Tests) tests" $totalErrors += $total.Failed } - if ($total.NotRun -gt 0) { - Write-GitHubError "There are $($total.NotRun) tests not run of $($total.Tests) tests" - $totalErrors += $total.NotRun - } if ($total.Inconclusive -gt 0) { Write-GitHubError "There are $($total.Inconclusive) inconclusive tests of $($total.Tests) tests" $totalErrors += $total.Inconclusive From 1137cb574f2dde6c43ca71cc9ef0a12cd94a0b2d Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Wed, 2 Apr 2025 20:57:19 +0200 Subject: [PATCH 45/54] Refactor: Streamline artifact handling by replacing manual download and extraction with dedicated GitHub API functions --- scripts/main.ps1 | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index b3b5b59..8bc627a 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -4,31 +4,12 @@ param() $PSStyle.OutputRendering = 'Ansi' -$repo = $env:GITHUB_REPOSITORY +$owner = $env:GITHUB_REPOSITORY_OWNER +$repo = $env:GITHUB_REPOSITORY_NAME $runId = $env:GITHUB_RUN_ID -$context = Get-GitHubContext -$testResultsFolder = New-Item -Path . -ItemType Directory -Name 'TestResults' -Force -$response = Invoke-GitHubAPI -ApiEndpoint "/repos/$repo/actions/runs/$runId/artifacts" -$artifacts = $response.Response.artifacts | Sort-Object -Property created_at -Descending | Group-Object -Property name | ForEach-Object { - $_.Group | Select-Object -First 1 -} -$testResultArtifacts = $artifacts | Where-Object { $_.name -like '*-TestResults' } -Write-Output "$($testResultArtifacts | Select-Object -Property name, size_in_bytes, updated_at, archive_download_url | Format-Table | Out-String)" - -foreach ($artifact in $testResultArtifacts) { - if ($artifact.name -like '*-TestResults') { - $url = $artifact.archive_download_url - $zipFile = Join-Path -Path $testResultsFolder.FullName -ChildPath "$($artifact.name).zip" - Write-Output "Downloading artifact [$($artifact.name)] to [$zipFile]" - Invoke-WebRequest -Uri $url -OutFile $zipFile -Token ($context.Token) -Authentication Bearer - Write-Output "Unzipping [$zipFile] to [$testResultsFolder]" - Expand-Archive -Path $zipFile -DestinationPath $testResultsFolder.FullName -Force - Remove-Item -Path $zipFile -Force - } -} - -$files = Get-ChildItem -Path $testResultsFolder -Recurse -File -Filter *.json | Sort-Object Name +$files = Get-GitHubArtifact -Owner $owner -Repository $repo -ID $runId -Name '*-TestResults' | + Save-GitHubArtifact -Path 'TestResults' -Expand -Cleanup | Where-Object { $_.Name -like '*.json' } | Sort-Object Name LogGroup 'List files' { $files.Name | Out-String From dc3e3e1a8dcd07e7ebc05b259dc26b9dc01488c6 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Thu, 17 Apr 2025 08:03:38 +0200 Subject: [PATCH 46/54] Refactor: Remove unnecessary cleanup option from Save-GitHubArtifact in file retrieval process --- scripts/main.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 8bc627a..7f7a9be 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -9,7 +9,7 @@ $repo = $env:GITHUB_REPOSITORY_NAME $runId = $env:GITHUB_RUN_ID $files = Get-GitHubArtifact -Owner $owner -Repository $repo -ID $runId -Name '*-TestResults' | - Save-GitHubArtifact -Path 'TestResults' -Expand -Cleanup | Where-Object { $_.Name -like '*.json' } | Sort-Object Name + Save-GitHubArtifact -Path 'TestResults' -Expand | Where-Object { $_.Name -like '*.json' } | Sort-Object Name LogGroup 'List files' { $files.Name | Out-String From cbb8491905351a66a20c73fb84c1ec57139733b6 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Thu, 17 Apr 2025 08:14:45 +0200 Subject: [PATCH 47/54] Refactor: Update Get-GitHubArtifact call to use WorkflowRunId and improve file retrieval process --- scripts/main.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 7f7a9be..fa2f3ea 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -8,8 +8,8 @@ $owner = $env:GITHUB_REPOSITORY_OWNER $repo = $env:GITHUB_REPOSITORY_NAME $runId = $env:GITHUB_RUN_ID -$files = Get-GitHubArtifact -Owner $owner -Repository $repo -ID $runId -Name '*-TestResults' | - Save-GitHubArtifact -Path 'TestResults' -Expand | Where-Object { $_.Name -like '*.json' } | Sort-Object Name +$files = Get-GitHubArtifact -Owner $owner -Repository $repo -WorkflowRunId $runId -Name '*-TestResults' | + Save-GitHubArtifact -Path 'TestResults' -Expand -PassThru | Get-ChildItem -Recurse -Filter *.json | Sort-Object Name LogGroup 'List files' { $files.Name | Out-String From aea7aa4887bc71307505b45517029974c6b97e04 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Thu, 17 Apr 2025 09:15:37 +0200 Subject: [PATCH 48/54] Refactor: Correct WorkflowRunId casing in Get-GitHubArtifact call for consistency --- scripts/main.ps1 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index fa2f3ea..6de21b5 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -3,12 +3,11 @@ [CmdletBinding()] param() -$PSStyle.OutputRendering = 'Ansi' $owner = $env:GITHUB_REPOSITORY_OWNER $repo = $env:GITHUB_REPOSITORY_NAME $runId = $env:GITHUB_RUN_ID -$files = Get-GitHubArtifact -Owner $owner -Repository $repo -WorkflowRunId $runId -Name '*-TestResults' | +$files = Get-GitHubArtifact -Owner $owner -Repository $repo -WorkflowRunID $runId -Name '*-TestResults' | Save-GitHubArtifact -Path 'TestResults' -Expand -PassThru | Get-ChildItem -Recurse -Filter *.json | Sort-Object Name LogGroup 'List files' { From 698a121b1a8c64995a27d6862a4d092b55e71a2a Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Thu, 17 Apr 2025 09:35:32 +0200 Subject: [PATCH 49/54] Refactor: Add Force parameter to Save-GitHubArtifact for improved file handling --- scripts/main.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 6de21b5..c664c26 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -8,7 +8,7 @@ $repo = $env:GITHUB_REPOSITORY_NAME $runId = $env:GITHUB_RUN_ID $files = Get-GitHubArtifact -Owner $owner -Repository $repo -WorkflowRunID $runId -Name '*-TestResults' | - Save-GitHubArtifact -Path 'TestResults' -Expand -PassThru | Get-ChildItem -Recurse -Filter *.json | Sort-Object Name + Save-GitHubArtifact -Path 'TestResults' -Force -Expand -PassThru | Get-ChildItem -Recurse -Filter *.json | Sort-Object Name -Unique LogGroup 'List files' { $files.Name | Out-String From 700840207a7874299ecb166aba860b34679ec746 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Thu, 17 Apr 2025 11:12:40 +0200 Subject: [PATCH 50/54] Refactor: Update README.md to enhance documentation for Get-PesterTestResults action --- README.md | 44 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d560186..0d335aa 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,55 @@ -# Template-Action +# Get-PesterTestResults Action -A template repository for GitHub Actions +A GitHub Action that gathers Pester test results for the PSModule process by analyzing test artifacts from the workflow run. +It validates test execution and results, providing a summary and failing if any tests are unsuccessful. + +This GitHub Action is a part of the [PSModule framework](https://github.com/PSModule). It is recommended to use the +[Process-PSModule workflow](https://github.com/PSModule/Process-PSModule) to automate the whole process of managing the PowerShell module. ## Usage +This action retrieves test artifacts named `*-TestResults`, processes the contained JSON files, and checks for test failures, unexecuted tests, +or missing results. It supports three categories of test suites: Source Code, PSModule, and Module tests. + ### Inputs +| Input | Description | Required | Default | +|-------------------------|-------------------------------------------------------------------------------------------------------------------------------|----------|-----------| +| `SourceCodeTestSuites` | JSON array specifying OS names for Source Code test suites. Example: `[{"OSName": "Windows"}]` | Yes | | +| `PSModuleTestSuites` | JSON array specifying OS names for PSModule test suites. Example: `[{"OSName": "Linux"}]` | Yes | | +| `ModuleTestSuites` | JSON array specifying TestName and OSName for Module test suites. Example: `[{"TestName": "Integration", "OSName": "MacOS"}]` | Yes | | +| `Debug` | Enable debug output (`true`/`false`). | No | `false` | +| `Verbose` | Enable verbose output (`true`/`false`). | No | `false` | +| `Version` | Exact version of the GitHub module to install (e.g., `1.0.0`). | No | Latest | +| `Prerelease` | Allow installing prerelease module versions (`true`/`false`). | No | `false` | +| `WorkingDirectory` | Working directory for the script. | No | `.` | + ### Secrets +No secrets are required if the action runs in the same repository. The action uses the default `GITHUB_TOKEN` provided by GitHub Actions to access workflow artifacts. + ### Outputs +This action does not define explicit outputs. Instead: + +- If any tests fail or errors occur, the action exits with a non-zero code, marking the workflow step as failed. +- Detailed results are logged in the workflow run's output. + ### Example ```yaml -Example here +- name: Run and Collect Pester Tests + uses: PSModule/Get-PesterTestResults@v1 + with: + SourceCodeTestSuites: '[{"OSName": "Windows"}, {"OSName": "Linux"}]' + PSModuleTestSuites: '[{"OSName": "Windows"}]' + ModuleTestSuites: '[{"TestName": "Integration", "OSName": "Windows"}]' + WorkingDirectory: './tests' ``` + +### Notes +- **Test Suite Inputs**: Must be valid JSON arrays. + - `SourceCodeTestSuites` and `PSModuleTestSuites` require `OSName`. + - `ModuleTestSuites` requires both `TestName` and `OSName`. +- **Artifact Names**: The action expects artifacts named `*-TestResults` containing Pester JSON reports. +- **Failure Conditions**: The action fails if tests are unexecuted, explicitly failed, or if result files are missing. From f216752ebc31d6bba658ded314e744ad4b357756 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Thu, 17 Apr 2025 11:40:31 +0200 Subject: [PATCH 51/54] Add test result reports for PSModuleTest-Module and PSModuleTest-SourceCode - Created JSON and XML test result reports for PSModuleTest-Module-Windows. - Created JSON and XML test result reports for PSModuleTest-SourceCode-Windows. - All tests in both modules passed successfully, with detailed execution times and results included. --- .github/workflows/Action-Test.yml | 37 +++++- README.md | 1 - .../PATH-Windows-TestResult-Report.json | 1 + .../PATH-Windows-TestResult-Report.xml | 48 ++++++++ ...Lint-Module-Windows-TestResult-Report.json | 1 + ...eLint-Module-Windows-TestResult-Report.xml | 111 ++++++++++++++++++ ...-SourceCode-Windows-TestResult-Report.json | 1 + ...t-SourceCode-Windows-TestResult-Report.xml | 111 ++++++++++++++++++ ...Test-Module-Windows-TestResult-Report.json | 1 + ...eTest-Module-Windows-TestResult-Report.xml | 28 +++++ ...-SourceCode-Windows-TestResult-Report.json | 1 + ...t-SourceCode-Windows-TestResult-Report.xml | 43 +++++++ 12 files changed, 382 insertions(+), 2 deletions(-) create mode 100644 tests/TestResults/PATH-Windows-TestResults/PATH-Windows-TestResult-Report.json create mode 100644 tests/TestResults/PATH-Windows-TestResults/PATH-Windows-TestResult-Report.xml create mode 100644 tests/TestResults/PSModuleLint-Module-Windows-TestResults/PSModuleLint-Module-Windows-TestResult-Report.json create mode 100644 tests/TestResults/PSModuleLint-Module-Windows-TestResults/PSModuleLint-Module-Windows-TestResult-Report.xml create mode 100644 tests/TestResults/PSModuleLint-SourceCode-Windows-TestResults/PSModuleLint-SourceCode-Windows-TestResult-Report.json create mode 100644 tests/TestResults/PSModuleLint-SourceCode-Windows-TestResults/PSModuleLint-SourceCode-Windows-TestResult-Report.xml create mode 100644 tests/TestResults/PSModuleTest-Module-Windows-TestResults/PSModuleTest-Module-Windows-TestResult-Report.json create mode 100644 tests/TestResults/PSModuleTest-Module-Windows-TestResults/PSModuleTest-Module-Windows-TestResult-Report.xml create mode 100644 tests/TestResults/PSModuleTest-SourceCode-Windows-TestResults/PSModuleTest-SourceCode-Windows-TestResult-Report.json create mode 100644 tests/TestResults/PSModuleTest-SourceCode-Windows-TestResults/PSModuleTest-SourceCode-Windows-TestResult-Report.xml diff --git a/.github/workflows/Action-Test.yml b/.github/workflows/Action-Test.yml index 93b53c1..ef2f4dc 100644 --- a/.github/workflows/Action-Test.yml +++ b/.github/workflows/Action-Test.yml @@ -25,7 +25,42 @@ jobs: - name: Checkout repo uses: actions/checkout@v4 + # Upload artifact from tests: + - name: Upload artifact [PATH-Windows-TestResults] + uses: actions/upload-artifact@v4 + with: + name: PATH-Windows-TestResults + path: ./tests/PATH-Windows-TestResults + retention-days: 1 + - name: Upload artifact [PSModuleLint-Module-Windows-TestResults] + uses: actions/upload-artifact@v4 + with: + name: PSModuleLint-Module-Windows-TestResults + path: ./tests/PSModuleLint-Module-Windows-TestResults + retention-days: 1 + - name: Upload artifact [PSModuleLint-SourceCode-Windows-TestResults] + uses: actions/upload-artifact@v4 + with: + name: PSModuleLint-SourceCode-Windows-TestResults + path: ./tests/PSModuleLint-SourceCode-Windows-TestResults + retention-days: 1 + - name: Upload artifact [PSModuleTest-Module-Windows-TestResults] + uses: actions/upload-artifact@v4 + with: + name: PSModuleTest-Module-Windows-TestResults + path: ./tests/PSModuleTest-Module-Windows-TestResults + retention-days: 1 + - name: Upload artifact [PSModuleTest-SourceCode-Windows-TestResults] + uses: actions/upload-artifact@v4 + with: + name: PSModuleTest-SourceCode-Windows-TestResults + path: ./tests/PSModuleTest-SourceCode-Windows-TestResults + retention-days: 1 + - name: Action-Test uses: ./ with: - WorkingDirectory: ./tests + SourceCodeTestSuites: '[{"OSName": "Windows"}' + PSModuleTestSuites: '[{"OSName": "Windows"}]' + ModuleTestSuites: '[{"TestName": "PATH", "OSName": "Windows"}]' + WorkingDirectory: './tests' diff --git a/README.md b/README.md index 0d335aa..cfeb5d4 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,6 @@ This action does not define explicit outputs. Instead: SourceCodeTestSuites: '[{"OSName": "Windows"}, {"OSName": "Linux"}]' PSModuleTestSuites: '[{"OSName": "Windows"}]' ModuleTestSuites: '[{"TestName": "Integration", "OSName": "Windows"}]' - WorkingDirectory: './tests' ``` ### Notes diff --git a/tests/TestResults/PATH-Windows-TestResults/PATH-Windows-TestResult-Report.json b/tests/TestResults/PATH-Windows-TestResults/PATH-Windows-TestResult-Report.json new file mode 100644 index 0000000..b36e461 --- /dev/null +++ b/tests/TestResults/PATH-Windows-TestResults/PATH-Windows-TestResult-Report.json @@ -0,0 +1 @@ +{"Depth":0,"ItemType":"TestSuite","Name":"PATH-Windows","Path":null,"Children":[{"Depth":1,"ItemType":"Container","Name":"PATH","Path":["PATH-Windows"],"Children":[{"Depth":2,"ItemType":"Block","Name":"PATH","Path":["PATH-Windows","PATH"],"Children":[[{"Depth":3,"ItemType":"Block","Name":"Function: Get-EnvironemntPath","Path":["PATH-Windows","PATH","PATH"],"Children":[[{"Depth":4,"ItemType":"Block","Name":"CurrentUser","Path":["PATH-Windows","PATH","PATH","Function: Get-EnvironemntPath"],"Children":[[{"Depth":5,"ItemType":"Test","Name":"Should not throw","Path":["PATH-Windows","PATH","PATH","Function: Get-EnvironemntPath","CurrentUser"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:53.9462579+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":1086898,"DiscoveryDuration":0,"UserDuration":538168,"FrameworkDuration":548730},{"Depth":5,"ItemType":"Test","Name":"Should not throw when using '-AsArray'","Path":["PATH-Windows","PATH","PATH","Function: Get-EnvironemntPath","CurrentUser"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:54.0543044+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":424915,"DiscoveryDuration":0,"UserDuration":365261,"FrameworkDuration":59654}]],"Result":"Passed","FailedCount":0,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":2,"SkippedCount":0,"InconclusiveCount":0,"NotRunCount":0,"TotalCount":2,"Executed":true,"ExecutedAt":"2025-04-17T07:28:53.9379759+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":1779884,"DiscoveryDuration":0,"UserDuration":909067,"FrameworkDuration":870817},{"Depth":4,"ItemType":"Block","Name":"AllUsers","Path":["PATH-Windows","PATH","PATH","Function: Get-EnvironemntPath"],"Children":[[{"Depth":5,"ItemType":"Test","Name":"Should not throw","Path":["PATH-Windows","PATH","PATH","Function: Get-EnvironemntPath","AllUsers"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:54.1190611+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":114855,"DiscoveryDuration":0,"UserDuration":53266,"FrameworkDuration":61589},{"Depth":5,"ItemType":"Test","Name":"Should not throw when using '-AsArray'","Path":["PATH-Windows","PATH","PATH","Function: Get-EnvironemntPath","AllUsers"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:54.1304947+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":162586,"DiscoveryDuration":0,"UserDuration":114430,"FrameworkDuration":48156}]],"Result":"Passed","FailedCount":0,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":2,"SkippedCount":0,"InconclusiveCount":0,"NotRunCount":0,"TotalCount":2,"Executed":true,"ExecutedAt":"2025-04-17T07:28:54.1159787+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":2139932,"DiscoveryDuration":0,"UserDuration":1085300,"FrameworkDuration":1054632}]],"Result":"Passed","FailedCount":0,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":4,"SkippedCount":0,"InconclusiveCount":0,"NotRunCount":0,"TotalCount":4,"Executed":true,"ExecutedAt":"2025-04-17T07:28:53.9353945+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":2203182,"DiscoveryDuration":0,"UserDuration":1089560,"FrameworkDuration":1113622},{"Depth":3,"ItemType":"Block","Name":"Function: Add-EnvironmentPath","Path":["PATH-Windows","PATH","PATH"],"Children":[{"Depth":4,"ItemType":"Test","Name":"Should not throw","Path":["PATH-Windows","PATH","PATH","Function: Add-EnvironmentPath"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:54.1587806+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":1323229,"DiscoveryDuration":0,"UserDuration":1265314,"FrameworkDuration":57915}],"Result":"Passed","FailedCount":0,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":1,"SkippedCount":0,"InconclusiveCount":0,"NotRunCount":0,"TotalCount":1,"Executed":true,"ExecutedAt":"2025-04-17T07:28:54.1557398+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":3582187,"DiscoveryDuration":0,"UserDuration":2360823,"FrameworkDuration":1221364},{"Depth":3,"ItemType":"Block","Name":"Function: Repair-EnvironmentPath","Path":["PATH-Windows","PATH","PATH"],"Children":[{"Depth":4,"ItemType":"Test","Name":"Should not throw","Path":["PATH-Windows","PATH","PATH","Function: Repair-EnvironmentPath"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:54.296415+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":1620942,"DiscoveryDuration":0,"UserDuration":458230,"FrameworkDuration":1162712}],"Result":"Passed","FailedCount":0,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":1,"SkippedCount":0,"InconclusiveCount":0,"NotRunCount":0,"TotalCount":1,"Executed":true,"ExecutedAt":"2025-04-17T07:28:54.2936318+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":5487321,"DiscoveryDuration":0,"UserDuration":2826457,"FrameworkDuration":2660864},{"Depth":3,"ItemType":"Block","Name":"Function: Remove-EnvironmentPath","Path":["PATH-Windows","PATH","PATH"],"Children":[{"Depth":4,"ItemType":"Test","Name":"Should not throw","Path":["PATH-Windows","PATH","PATH","Function: Remove-EnvironmentPath"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:54.4863427+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":637483,"DiscoveryDuration":0,"UserDuration":582875,"FrameworkDuration":54608}],"Result":"Passed","FailedCount":0,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":1,"SkippedCount":0,"InconclusiveCount":0,"NotRunCount":0,"TotalCount":1,"Executed":true,"ExecutedAt":"2025-04-17T07:28:54.4841492+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":6172845,"DiscoveryDuration":0,"UserDuration":3413700,"FrameworkDuration":2759145}]],"Result":"Passed","FailedCount":0,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":7,"SkippedCount":0,"InconclusiveCount":0,"NotRunCount":0,"TotalCount":7,"Executed":true,"ExecutedAt":"2025-04-17T07:28:53.9213988+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":6337331,"DiscoveryDuration":0,"UserDuration":3430242,"FrameworkDuration":2907089}],"Result":"Passed","FailedCount":0,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":7,"SkippedCount":0,"InconclusiveCount":0,"NotRunCount":0,"TotalCount":7,"Executed":true,"ExecutedAt":"2025-04-17T07:28:53.8529645+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":16305353,"DiscoveryDuration":1458279,"UserDuration":3480232,"FrameworkDuration":11366842}],"Result":"Passed","FailedCount":0,"FailedBlocksCount":0,"FailedContainersCount":0,"PassedCount":7,"SkippedCount":0,"InconclusiveCount":0,"NotRunCount":0,"TotalCount":7,"Executed":true,"ExecutedAt":"2025-04-17T07:28:53.0665812+00:00","Version":"5.7.1","PSVersion":"7.4.7","Plugins":null,"PluginConfiguration":null,"PluginData":null,"Configuration":{"TestDrive":{"Enabled":true},"Output":{"Verbosity":"Detailed","CIFormat":"GithubActions","StackTraceVerbosity":"Filtered","CILogLevel":"Error","RenderMode":"Ansi"},"Run":{"ExcludePath":[],"ScriptBlock":[],"TestExtension":".Tests.ps1","SkipRun":false,"Path":["C:\\Users\\runneradmin\\Documents\\PowerShell\\Modules\\PSModuleTest\\999.0.0"],"PassThru":true,"Throw":false,"SkipRemainingOnFailure":"None","Container":[{"Path":"D:\\a\\Path\\Path\\tests\\PATH.Tests.ps1","Data":{}}],"Exit":false},"TestRegistry":{"Enabled":true},"TestResult":{"OutputEncoding":"UTF8","OutputFormat":"NUnitXml","OutputPath":"D:\\a\\Path\\Path/TestResult/PATH-Windows-TestResult-Report.xml","Enabled":true,"TestSuiteName":"PATH-Windows"},"Should":{"ErrorAction":"Stop"},"Debug":{"WriteDebugMessagesFrom":["Discovery","Skip","Mock","CodeCoverage"],"ShowNavigationMarkers":false,"WriteDebugMessages":false,"ReturnRawResultObject":false,"ShowFullErrors":false},"CodeCoverage":{"OutputFormat":"JaCoCo","OutputPath":"D:\\a\\Path\\Path/CodeCoverage/PATH-Windows-CodeCoverage-Report.xml","RecursePaths":true,"OutputEncoding":"UTF8","ExcludeTests":true,"Path":[],"UseBreakpoints":true,"Enabled":true,"SingleHitBreakpoints":true,"CoveragePercentTarget":0.0},"Filter":{"ExcludeTag":["Flaky"],"FullName":[],"Tag":[],"Line":[],"ExcludeLine":[]}},"Duration":16305353,"DiscoveryDuration":1458279,"UserDuration":3480232,"FrameworkDuration":11366842} diff --git a/tests/TestResults/PATH-Windows-TestResults/PATH-Windows-TestResult-Report.xml b/tests/TestResults/PATH-Windows-TestResults/PATH-Windows-TestResult-Report.xml new file mode 100644 index 0000000..b8a7b89 --- /dev/null +++ b/tests/TestResults/PATH-Windows-TestResults/PATH-Windows-TestResult-Report.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/TestResults/PSModuleLint-Module-Windows-TestResults/PSModuleLint-Module-Windows-TestResult-Report.json b/tests/TestResults/PSModuleLint-Module-Windows-TestResults/PSModuleLint-Module-Windows-TestResult-Report.json new file mode 100644 index 0000000..a77be13 --- /dev/null +++ b/tests/TestResults/PSModuleLint-Module-Windows-TestResults/PSModuleLint-Module-Windows-TestResult-Report.json @@ -0,0 +1 @@ +{"Depth":0,"ItemType":"TestSuite","Name":"PSModuleLint-Module-Windows","Path":null,"Children":[{"Depth":1,"ItemType":"Container","Name":"PSScriptAnalyzer","Path":["PSModuleLint-Module-Windows"],"Children":[{"Depth":2,"ItemType":"Block","Name":"PSScriptAnalyzer","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer"],"Children":[[{"Depth":3,"ItemType":"Block","Name":"Severity: Information","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer"],"Children":[[{"Depth":4,"ItemType":"Test","Name":"'=' is not an assignment operator. Did you mean the equality operator '-eq'? (PSPossibleIncorrectUsageOfAssignmentOperator)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Information"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:59.8830893+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":1125258,"DiscoveryDuration":0,"UserDuration":522970,"FrameworkDuration":602288},{"Depth":4,"ItemType":"Test","Name":"Avoid trailing whitespace (PSAvoidTrailingWhitespace)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Information"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:59.9950988+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":57307,"DiscoveryDuration":0,"UserDuration":18499,"FrameworkDuration":38808},{"Depth":4,"ItemType":"Test","Name":"Avoid using double quotes if the string is constant. (PSAvoidUsingDoubleQuotesForConstantString)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Information"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.0008184+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":71030,"DiscoveryDuration":0,"UserDuration":22262,"FrameworkDuration":48768},{"Depth":4,"ItemType":"Test","Name":"Avoid Using Positional Parameters (PSAvoidUsingPositionalParameters)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Information"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.0081527+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":78856,"DiscoveryDuration":0,"UserDuration":25774,"FrameworkDuration":53082},{"Depth":4,"ItemType":"Test","Name":"Basic Comment Help (PSProvideCommentHelp)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Information"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.016053+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":70247,"DiscoveryDuration":0,"UserDuration":27255,"FrameworkDuration":42992},{"Depth":4,"ItemType":"Test","Name":"DSC examples are present (PSDSCDscExamplesPresent)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Information"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.0232511+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":65204,"DiscoveryDuration":0,"UserDuration":19303,"FrameworkDuration":45901},{"Depth":4,"ItemType":"Test","Name":"Dsc tests are present (PSDSCDscTestsPresent)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Information"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.0298176+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":59572,"DiscoveryDuration":0,"UserDuration":19632,"FrameworkDuration":39940},{"Depth":4,"ItemType":"Test","Name":"Return Correct Types For DSC Functions (PSDSCReturnCorrectTypesForDSCFunctions)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Information"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.0358689+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":167148,"DiscoveryDuration":0,"UserDuration":18447,"FrameworkDuration":148701},{"Depth":4,"ItemType":"Test","Name":"Use exact casing of cmdlet/function/parameter name. (PSUseCorrectCasing)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Information"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.0526732+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":63238,"DiscoveryDuration":0,"UserDuration":18580,"FrameworkDuration":44658},{"Depth":4,"ItemType":"Test","Name":"Use OutputType Correctly (PSUseOutputTypeCorrectly)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Information"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.059154+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":67924,"DiscoveryDuration":0,"UserDuration":22551,"FrameworkDuration":45373},{"Depth":4,"ItemType":"Test","Name":"Use verbose message in DSC resource (PSDSCUseVerboseMessageInDSCResource)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Information"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.0660632+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":75887,"DiscoveryDuration":0,"UserDuration":21324,"FrameworkDuration":54563}]],"Result":"Passed","FailedCount":0,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":11,"SkippedCount":0,"InconclusiveCount":0,"NotRunCount":0,"TotalCount":11,"Executed":true,"ExecutedAt":"2025-04-17T07:28:59.8715695+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":2242916,"DiscoveryDuration":0,"UserDuration":742703,"FrameworkDuration":1500213},{"Depth":3,"ItemType":"Block","Name":"Severity: Warning","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer"],"Children":[[{"Depth":4,"ItemType":"Test","Name":"'>' is not a comparison operator. Use '-gt' (greater than) or '-ge' (greater or equal). (PSPossibleIncorrectUsageOfRedirectionOperator)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.0984258+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":583021,"DiscoveryDuration":0,"UserDuration":23894,"FrameworkDuration":559127},{"Depth":4,"ItemType":"Test","Name":"Align assignment statement (PSAlignAssignmentStatement)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.1568059+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":501066,"DiscoveryDuration":0,"UserDuration":24651,"FrameworkDuration":476415},{"Depth":4,"ItemType":"Test","Name":"Avoid AllowUnencryptedAuthentication Switch (PSAvoidUsingAllowUnencryptedAuthentication)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.2070516+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":65889,"DiscoveryDuration":0,"UserDuration":24455,"FrameworkDuration":41434},{"Depth":4,"ItemType":"Test","Name":"Avoid Default Value For Mandatory Parameter (PSAvoidDefaultValueForMandatoryParameter)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.2137416+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":63670,"DiscoveryDuration":0,"UserDuration":22698,"FrameworkDuration":40972},{"Depth":4,"ItemType":"Test","Name":"Avoid exclaim operator (PSAvoidExclaimOperator)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.2203808+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":354235,"DiscoveryDuration":0,"UserDuration":22788,"FrameworkDuration":331447},{"Depth":4,"ItemType":"Test","Name":"Avoid global aliases. (PSAvoidGlobalAliases)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.2558442+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":143326,"DiscoveryDuration":0,"UserDuration":24117,"FrameworkDuration":119209},{"Depth":4,"ItemType":"Test","Name":"Avoid global functiosn and aliases (PSAvoidGlobalFunctions)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.2702859+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":67620,"DiscoveryDuration":0,"UserDuration":23055,"FrameworkDuration":44565},{"Depth":4,"ItemType":"Test","Name":"Avoid Invoking Empty Members (PSAvoidInvokingEmptyMembers)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.2771443+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":179159,"DiscoveryDuration":0,"UserDuration":24192,"FrameworkDuration":154967},{"Depth":4,"ItemType":"Test","Name":"Avoid long lines (PSAvoidLongLines)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.2953197+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":75371,"DiscoveryDuration":0,"UserDuration":30720,"FrameworkDuration":44651},{"Depth":4,"ItemType":"Test","Name":"Avoid multiple type specifiers on parameters (PSAvoidMultipleTypeAttributes)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.3030038+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":69232,"DiscoveryDuration":0,"UserDuration":24532,"FrameworkDuration":44700},{"Depth":4,"ItemType":"Test","Name":"Avoid overwriting built in cmdlets (PSAvoidOverwritingBuiltInCmdlets)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.3100584+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":68331,"DiscoveryDuration":0,"UserDuration":24908,"FrameworkDuration":43423},{"Depth":4,"ItemType":"Test","Name":"Avoid semicolons as line terminators (PSAvoidSemicolonsAsLineTerminators)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.3170225+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":253254,"DiscoveryDuration":0,"UserDuration":29814,"FrameworkDuration":223440},{"Depth":4,"ItemType":"Test","Name":"Avoid Using Broken Hash Algorithms (PSAvoidUsingBrokenHashAlgorithms)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.3424996+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":69196,"DiscoveryDuration":0,"UserDuration":25560,"FrameworkDuration":43636},{"Depth":4,"ItemType":"Test","Name":"Avoid Using Cmdlet Aliases or omitting the 'Get-' prefix. (PSAvoidUsingCmdletAliases)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.3495377+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":69937,"DiscoveryDuration":0,"UserDuration":25874,"FrameworkDuration":44063},{"Depth":4,"ItemType":"Test","Name":"Avoid Using Deprecated Manifest Fields (PSAvoidUsingDeprecatedManifestFields)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.3565959+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":70618,"DiscoveryDuration":0,"UserDuration":24861,"FrameworkDuration":45757},{"Depth":4,"ItemType":"Test","Name":"Avoid Using Empty Catch Block (PSAvoidUsingEmptyCatchBlock)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.3638225+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":69575,"DiscoveryDuration":0,"UserDuration":24967,"FrameworkDuration":44608},{"Depth":4,"ItemType":"Test","Name":"Avoid Using Get-WMIObject, Remove-WMIObject, Invoke-WmiMethod, Register-WmiEvent, Set-WmiInstance (PSAvoidUsingWMICmdlet)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.3707948+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":48331,"DiscoveryDuration":0,"UserDuration":15978,"FrameworkDuration":32353},{"Depth":4,"ItemType":"Test","Name":"Avoid Using Invoke-Expression (PSAvoidUsingInvokeExpression)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.3757422+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":48075,"DiscoveryDuration":0,"UserDuration":16145,"FrameworkDuration":31930},{"Depth":4,"ItemType":"Test","Name":"Avoid using null or empty HelpMessage parameter attribute. (PSAvoidNullOrEmptyHelpMessageAttribute)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.3806346+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":59925,"DiscoveryDuration":0,"UserDuration":22863,"FrameworkDuration":37062},{"Depth":4,"ItemType":"Test","Name":"Avoid Using Plain Text For Password Parameter (PSAvoidUsingPlainTextForPassword)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.3867655+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":52526,"DiscoveryDuration":0,"UserDuration":17667,"FrameworkDuration":34859},{"Depth":4,"ItemType":"Test","Name":"Avoid Using ShouldContinue Without Boolean Force Parameter (PSAvoidShouldContinueWithoutForce)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.3921259+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":60018,"DiscoveryDuration":0,"UserDuration":22742,"FrameworkDuration":37276},{"Depth":4,"ItemType":"Test","Name":"Avoid Using Write-Host (PSAvoidUsingWriteHost)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.398266+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":2520975,"DiscoveryDuration":0,"UserDuration":23694,"FrameworkDuration":2497281},{"Depth":4,"ItemType":"Test","Name":"Changing automtic variables might have undesired side effects (PSAvoidAssignmentToAutomaticVariable)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.6505303+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":65919,"DiscoveryDuration":0,"UserDuration":25727,"FrameworkDuration":40192},{"Depth":4,"ItemType":"Test","Name":"Cmdlet Singular Noun (PSUseSingularNouns)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.6571999+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":54605,"DiscoveryDuration":0,"UserDuration":18432,"FrameworkDuration":36173},{"Depth":4,"ItemType":"Test","Name":"Cmdlet Verbs (PSUseApprovedVerbs)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.6627618+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":53278,"DiscoveryDuration":0,"UserDuration":18811,"FrameworkDuration":34467},{"Depth":4,"ItemType":"Test","Name":"Create hashtables with literal initializers (PSUseLiteralInitializerForHashtable)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.6681955+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":52149,"DiscoveryDuration":0,"UserDuration":17794,"FrameworkDuration":34355},{"Depth":4,"ItemType":"Test","Name":"Extra Variables (PSUseDeclaredVarsMoreThanAssignments)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.6736213+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":54183,"DiscoveryDuration":0,"UserDuration":18680,"FrameworkDuration":35503},{"Depth":4,"ItemType":"Test","Name":"Misleading Backtick (PSMisleadingBacktick)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.6791406+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":105864,"DiscoveryDuration":0,"UserDuration":21058,"FrameworkDuration":84806},{"Depth":4,"ItemType":"Test","Name":"Module Manifest Fields (PSMissingModuleManifestField)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.6898577+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":54483,"DiscoveryDuration":0,"UserDuration":18705,"FrameworkDuration":35778},{"Depth":4,"ItemType":"Test","Name":"No Global Variables (PSAvoidGlobalVars)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.6954062+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":53709,"DiscoveryDuration":0,"UserDuration":18685,"FrameworkDuration":35024},{"Depth":4,"ItemType":"Test","Name":"Null Comparison (PSPossibleIncorrectComparisonWithNull)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.700897+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":54814,"DiscoveryDuration":0,"UserDuration":18516,"FrameworkDuration":36298},{"Depth":4,"ItemType":"Test","Name":"Place close braces (PSPlaceCloseBrace)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.706486+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":59822,"DiscoveryDuration":0,"UserDuration":18799,"FrameworkDuration":41023},{"Depth":4,"ItemType":"Test","Name":"Place open braces consistently (PSPlaceOpenBrace)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.7125959+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":59065,"DiscoveryDuration":0,"UserDuration":18799,"FrameworkDuration":40266},{"Depth":4,"ItemType":"Test","Name":"Reserved Cmdlet Chars (PSReservedCmdletChar)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.7186145+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":56155,"DiscoveryDuration":0,"UserDuration":17729,"FrameworkDuration":38426},{"Depth":4,"ItemType":"Test","Name":"ReviewUnusedParameter (PSReviewUnusedParameter)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.7243342+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":56496,"DiscoveryDuration":0,"UserDuration":17266,"FrameworkDuration":39230},{"Depth":4,"ItemType":"Test","Name":"Should Process (PSShouldProcess)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.7301966+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":59680,"DiscoveryDuration":0,"UserDuration":16748,"FrameworkDuration":42932},{"Depth":4,"ItemType":"Test","Name":"Switch Parameters Should Not Default To True (PSAvoidDefaultValueSwitchParameter)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.736205+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":55338,"DiscoveryDuration":0,"UserDuration":16680,"FrameworkDuration":38658},{"Depth":4,"ItemType":"Test","Name":"Use 'Using:' scope modifier in RunSpace ScriptBlocks (PSUseUsingScopeModifierInNewRunspaces)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.7418022+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":53579,"DiscoveryDuration":0,"UserDuration":16813,"FrameworkDuration":36766},{"Depth":4,"ItemType":"Test","Name":"Use BOM encoding for non-ASCII files (PSUseBOMForUnicodeEncodedFile)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.7472502+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":54160,"DiscoveryDuration":0,"UserDuration":16631,"FrameworkDuration":37529},{"Depth":4,"ItemType":"Test","Name":"Use Cmdlet Correctly (PSUseCmdletCorrectly)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.7528067+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":59731,"DiscoveryDuration":0,"UserDuration":20305,"FrameworkDuration":39426},{"Depth":4,"ItemType":"Test","Name":"Use compatible cmdlets (PSUseCompatibleCmdlets)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.7588887+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":62274,"DiscoveryDuration":0,"UserDuration":21120,"FrameworkDuration":41154},{"Depth":4,"ItemType":"Test","Name":"Use compatible commands (PSUseCompatibleCommands)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.7651668+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":55213,"DiscoveryDuration":0,"UserDuration":17071,"FrameworkDuration":38142},{"Depth":4,"ItemType":"Test","Name":"Use compatible types (PSUseCompatibleTypes)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.7708513+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":61075,"DiscoveryDuration":0,"UserDuration":19316,"FrameworkDuration":41759},{"Depth":4,"ItemType":"Test","Name":"Use consistent indentation (PSUseConsistentIndentation)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.7769969+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":53251,"DiscoveryDuration":0,"UserDuration":16433,"FrameworkDuration":36818},{"Depth":4,"ItemType":"Test","Name":"Use process block for command that accepts input from pipeline. (PSUseProcessBlockForPipelineCommand)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.7824063+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":52161,"DiscoveryDuration":0,"UserDuration":16306,"FrameworkDuration":35855},{"Depth":4,"ItemType":"Test","Name":"Use PSCredential type. (PSUsePSCredentialType)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.7877119+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":51793,"DiscoveryDuration":0,"UserDuration":16281,"FrameworkDuration":35512},{"Depth":4,"ItemType":"Test","Name":"Use ShouldProcess For State Changing Functions (PSUseShouldProcessForStateChangingFunctions)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.792981+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":52944,"DiscoveryDuration":0,"UserDuration":16325,"FrameworkDuration":36619},{"Depth":4,"ItemType":"Test","Name":"Use SupportsShouldProcess (PSUseSupportsShouldProcess)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.7983954+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":43807,"DiscoveryDuration":0,"UserDuration":12718,"FrameworkDuration":31089},{"Depth":4,"ItemType":"Test","Name":"Use the *ToExport module manifest fields. (PSUseToExportFieldsInManifest)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.8027865+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":42398,"DiscoveryDuration":0,"UserDuration":12365,"FrameworkDuration":30033},{"Depth":4,"ItemType":"Test","Name":"Use UTF8 Encoding For Help File (PSUseUTF8EncodingForHelpFile)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.8070982+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":42126,"DiscoveryDuration":0,"UserDuration":12269,"FrameworkDuration":29857},{"Depth":4,"ItemType":"Test","Name":"Use whitespaces (PSUseConsistentWhitespace)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.8113878+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":44671,"DiscoveryDuration":0,"UserDuration":12303,"FrameworkDuration":32368}]],"Result":"Passed","FailedCount":0,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":51,"SkippedCount":0,"InconclusiveCount":0,"NotRunCount":0,"TotalCount":51,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.0958762+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":9495410,"DiscoveryDuration":0,"UserDuration":1776174,"FrameworkDuration":7719236},{"Depth":3,"ItemType":"Block","Name":"Severity: Error","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer"],"Children":[[{"Depth":4,"ItemType":"Test","Name":"Avoid Using ComputerName Hardcoded (PSAvoidUsingComputerNameHardcoded)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Error"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.8235506+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":57273,"DiscoveryDuration":0,"UserDuration":14134,"FrameworkDuration":43139},{"Depth":4,"ItemType":"Test","Name":"Avoid Using SecureString With Plain Text (PSAvoidUsingConvertToSecureStringWithPlainText)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Error"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.8293691+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":53152,"DiscoveryDuration":0,"UserDuration":16612,"FrameworkDuration":36540},{"Depth":4,"ItemType":"Test","Name":"Avoid Using Username and Password Parameters (PSAvoidUsingUsernameAndPasswordParams)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Error"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.8347425+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":43193,"DiscoveryDuration":0,"UserDuration":12533,"FrameworkDuration":30660},{"Depth":4,"ItemType":"Test","Name":"Reserved Parameters (PSReservedParams)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Error"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.8392073+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":55811,"DiscoveryDuration":0,"UserDuration":18232,"FrameworkDuration":37579},{"Depth":4,"ItemType":"Test","Name":"Use compatible syntax (PSUseCompatibleSyntax)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Error"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.8448053+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":43938,"DiscoveryDuration":0,"UserDuration":12787,"FrameworkDuration":31151},{"Depth":4,"ItemType":"Test","Name":"Use identical mandatory parameters for DSC Get/Test/Set TargetResource functions (PSDSCUseIdenticalMandatoryParametersForDSC)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Error"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.8493268+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":52632,"DiscoveryDuration":0,"UserDuration":16265,"FrameworkDuration":36367},{"Depth":4,"ItemType":"Test","Name":"Use Identical Parameters For DSC Test and Set Functions (PSDSCUseIdenticalParametersForDSC)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Error"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.8546554+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":43124,"DiscoveryDuration":0,"UserDuration":12751,"FrameworkDuration":30373},{"Depth":4,"ItemType":"Test","Name":"Use Standard Get/Set/Test TargetResource functions in DSC Resource (PSDSCStandardDSCFunctionsInResource)","Path":["PSModuleLint-Module-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Error"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.8590368+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":43549,"DiscoveryDuration":0,"UserDuration":13011,"FrameworkDuration":30538}]],"Result":"Passed","FailedCount":0,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":8,"SkippedCount":0,"InconclusiveCount":0,"NotRunCount":0,"TotalCount":8,"Executed":true,"ExecutedAt":"2025-04-17T07:29:00.8211488+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":9956823,"DiscoveryDuration":0,"UserDuration":1897102,"FrameworkDuration":8059721}]],"Result":"Passed","FailedCount":0,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":70,"SkippedCount":0,"InconclusiveCount":0,"NotRunCount":0,"TotalCount":70,"Executed":true,"ExecutedAt":"2025-04-17T07:28:58.4294544+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":24418373,"DiscoveryDuration":0,"UserDuration":16183191,"FrameworkDuration":8235182}],"Result":"Passed","FailedCount":0,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":70,"SkippedCount":0,"InconclusiveCount":0,"NotRunCount":0,"TotalCount":70,"Executed":true,"ExecutedAt":"2025-04-17T07:28:58.3352017+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":51561209,"DiscoveryDuration":23320739,"UserDuration":16295008,"FrameworkDuration":11945462}],"Result":"Passed","FailedCount":0,"FailedBlocksCount":0,"FailedContainersCount":0,"PassedCount":70,"SkippedCount":0,"InconclusiveCount":0,"NotRunCount":0,"TotalCount":70,"Executed":true,"ExecutedAt":"2025-04-17T07:28:55.6986531+00:00","Version":"5.7.1","PSVersion":"7.4.7","Plugins":null,"PluginConfiguration":null,"PluginData":null,"Configuration":{"TestRegistry":{"Enabled":true},"TestDrive":{"Enabled":true},"Filter":{"FullName":[],"ExcludeLine":[],"ExcludeTag":[],"Tag":[],"Line":[]},"Debug":{"ShowNavigationMarkers":false,"ReturnRawResultObject":false,"WriteDebugMessagesFrom":["Discovery","Skip","Mock","CodeCoverage"],"ShowFullErrors":false,"WriteDebugMessages":false},"TestResult":{"TestSuiteName":"PSModuleLint-Module-Windows","Enabled":true,"OutputEncoding":"UTF8","OutputFormat":"NUnitXml","OutputPath":"D:\\a\\Path\\Path/TestResult/PSModuleLint-Module-Windows-TestResult-Report.xml"},"CodeCoverage":{"CoveragePercentTarget":75.0,"Path":[],"OutputEncoding":"UTF8","OutputPath":"D:\\a\\Path\\Path/CodeCoverage/PSModuleLint-Module-Windows-CodeCoverage-Report.xml","OutputFormat":"JaCoCo","SingleHitBreakpoints":true,"UseBreakpoints":true,"Enabled":false,"ExcludeTests":true,"RecursePaths":true},"Output":{"CILogLevel":"Error","Verbosity":"Detailed","CIFormat":"GithubActions","RenderMode":"Ansi","StackTraceVerbosity":"Filtered"},"Should":{"ErrorAction":"Stop"},"Run":{"Path":["D:\\a\\Path\\Path\\outputs\\module"],"TestExtension":".Tests.ps1","ScriptBlock":[],"PassThru":true,"Exit":false,"ExcludePath":[],"SkipRemainingOnFailure":"None","SkipRun":false,"Container":[{"Path":"D:\\a\\_actions\\PSModule\\Invoke-ScriptAnalyzer\\v3\\scripts\\tests\\PSScriptAnalyzer\\PSScriptAnalyzer.Tests.ps1","Data":{"Path":"D:\\a\\Path\\Path\\outputs\\module","SettingsFilePath":"D:\\a\\_actions\\PSModule\\Invoke-ScriptAnalyzer\\v3\\scripts\\tests\\PSScriptAnalyzer/Module.Settings.psd1","Verbose":false,"Debug":false}}],"Throw":false}},"Duration":51561209,"DiscoveryDuration":23320739,"UserDuration":16295008,"FrameworkDuration":11945462} diff --git a/tests/TestResults/PSModuleLint-Module-Windows-TestResults/PSModuleLint-Module-Windows-TestResult-Report.xml b/tests/TestResults/PSModuleLint-Module-Windows-TestResults/PSModuleLint-Module-Windows-TestResult-Report.xml new file mode 100644 index 0000000..dfd0da1 --- /dev/null +++ b/tests/TestResults/PSModuleLint-Module-Windows-TestResults/PSModuleLint-Module-Windows-TestResult-Report.xml @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/TestResults/PSModuleLint-SourceCode-Windows-TestResults/PSModuleLint-SourceCode-Windows-TestResult-Report.json b/tests/TestResults/PSModuleLint-SourceCode-Windows-TestResults/PSModuleLint-SourceCode-Windows-TestResult-Report.json new file mode 100644 index 0000000..afdf57f --- /dev/null +++ b/tests/TestResults/PSModuleLint-SourceCode-Windows-TestResults/PSModuleLint-SourceCode-Windows-TestResult-Report.json @@ -0,0 +1 @@ +{"Depth":0,"ItemType":"TestSuite","Name":"PSModuleLint-SourceCode-Windows","Path":null,"Children":[{"Depth":1,"ItemType":"Container","Name":"PSScriptAnalyzer","Path":["PSModuleLint-SourceCode-Windows"],"Children":[{"Depth":2,"ItemType":"Block","Name":"PSScriptAnalyzer","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer"],"Children":[[{"Depth":3,"ItemType":"Block","Name":"Severity: Information","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer"],"Children":[[{"Depth":4,"ItemType":"Test","Name":"'=' is not an assignment operator. Did you mean the equality operator '-eq'? (PSPossibleIncorrectUsageOfAssignmentOperator)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Information"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:55.8489142+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":1014280,"DiscoveryDuration":0,"UserDuration":464897,"FrameworkDuration":549383},{"Depth":4,"ItemType":"Test","Name":"Avoid trailing whitespace (PSAvoidTrailingWhitespace)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Information"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:55.9498155+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":56023,"DiscoveryDuration":0,"UserDuration":18400,"FrameworkDuration":37623},{"Depth":4,"ItemType":"Test","Name":"Avoid using double quotes if the string is constant. (PSAvoidUsingDoubleQuotesForConstantString)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Information"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:55.9554835+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":51501,"DiscoveryDuration":0,"UserDuration":16313,"FrameworkDuration":35188},{"Depth":4,"ItemType":"Test","Name":"Avoid Using Positional Parameters (PSAvoidUsingPositionalParameters)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Information"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:55.9607695+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":64730,"DiscoveryDuration":0,"UserDuration":24129,"FrameworkDuration":40601},{"Depth":4,"ItemType":"Test","Name":"Basic Comment Help (PSProvideCommentHelp)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Information"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:55.9672847+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":64716,"DiscoveryDuration":0,"UserDuration":24214,"FrameworkDuration":40502},{"Depth":4,"ItemType":"Test","Name":"DSC examples are present (PSDSCDscExamplesPresent)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Information"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:55.973912+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":66759,"DiscoveryDuration":0,"UserDuration":20664,"FrameworkDuration":46095},{"Depth":4,"ItemType":"Test","Name":"Dsc tests are present (PSDSCDscTestsPresent)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Information"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:55.9806749+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":58575,"DiscoveryDuration":0,"UserDuration":19867,"FrameworkDuration":38708},{"Depth":4,"ItemType":"Test","Name":"Return Correct Types For DSC Functions (PSDSCReturnCorrectTypesForDSCFunctions)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Information"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:55.9865697+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":52326,"DiscoveryDuration":0,"UserDuration":16796,"FrameworkDuration":35530},{"Depth":4,"ItemType":"Test","Name":"Use exact casing of cmdlet/function/parameter name. (PSUseCorrectCasing)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Information"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:55.9918972+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":62528,"DiscoveryDuration":0,"UserDuration":17173,"FrameworkDuration":45355},{"Depth":4,"ItemType":"Test","Name":"Use OutputType Correctly (PSUseOutputTypeCorrectly)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Information"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:55.998268+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":56678,"DiscoveryDuration":0,"UserDuration":18689,"FrameworkDuration":37989},{"Depth":4,"ItemType":"Test","Name":"Use verbose message in DSC resource (PSDSCUseVerboseMessageInDSCResource)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Information"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.0040241+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":68512,"DiscoveryDuration":0,"UserDuration":16972,"FrameworkDuration":51540}]],"Result":"Passed","FailedCount":0,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":11,"SkippedCount":0,"InconclusiveCount":0,"NotRunCount":0,"TotalCount":11,"Executed":true,"ExecutedAt":"2025-04-17T07:28:55.8182634+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":2246512,"DiscoveryDuration":0,"UserDuration":664724,"FrameworkDuration":1581788},{"Depth":3,"ItemType":"Block","Name":"Severity: Warning","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer"],"Children":[[{"Depth":4,"ItemType":"Test","Name":"'>' is not a comparison operator. Use '-gt' (greater than) or '-ge' (greater or equal). (PSPossibleIncorrectUsageOfRedirectionOperator)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.0453142+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":499025,"DiscoveryDuration":0,"UserDuration":24910,"FrameworkDuration":474115},{"Depth":4,"ItemType":"Test","Name":"Align assignment statement (PSAlignAssignmentStatement)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.0953141+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":524017,"DiscoveryDuration":0,"UserDuration":23978,"FrameworkDuration":500039},{"Depth":4,"ItemType":"Test","Name":"Avoid AllowUnencryptedAuthentication Switch (PSAvoidUsingAllowUnencryptedAuthentication)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.1478842+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":67013,"DiscoveryDuration":0,"UserDuration":25401,"FrameworkDuration":41612},{"Depth":4,"ItemType":"Test","Name":"Avoid Default Value For Mandatory Parameter (PSAvoidDefaultValueForMandatoryParameter)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.1547183+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":61863,"DiscoveryDuration":0,"UserDuration":22881,"FrameworkDuration":38982},{"Depth":4,"ItemType":"Test","Name":"Avoid exclaim operator (PSAvoidExclaimOperator)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.1609881+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":336689,"DiscoveryDuration":0,"UserDuration":22048,"FrameworkDuration":314641},{"Depth":4,"ItemType":"Test","Name":"Avoid global aliases. (PSAvoidGlobalAliases)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.1948286+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":152213,"DiscoveryDuration":0,"UserDuration":24719,"FrameworkDuration":127494},{"Depth":4,"ItemType":"Test","Name":"Avoid global functiosn and aliases (PSAvoidGlobalFunctions)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.2102136+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":67782,"DiscoveryDuration":0,"UserDuration":24739,"FrameworkDuration":43043},{"Depth":4,"ItemType":"Test","Name":"Avoid Invoking Empty Members (PSAvoidInvokingEmptyMembers)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.2170638+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":62809,"DiscoveryDuration":0,"UserDuration":24673,"FrameworkDuration":38136},{"Depth":4,"ItemType":"Test","Name":"Avoid long lines (PSAvoidLongLines)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.2234479+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":59985,"DiscoveryDuration":0,"UserDuration":22787,"FrameworkDuration":37198},{"Depth":4,"ItemType":"Test","Name":"Avoid multiple type specifiers on parameters (PSAvoidMultipleTypeAttributes)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.2295569+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":66656,"DiscoveryDuration":0,"UserDuration":23159,"FrameworkDuration":43497},{"Depth":4,"ItemType":"Test","Name":"Avoid overwriting built in cmdlets (PSAvoidOverwritingBuiltInCmdlets)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.2363316+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":63780,"DiscoveryDuration":0,"UserDuration":21877,"FrameworkDuration":41903},{"Depth":4,"ItemType":"Test","Name":"Avoid semicolons as line terminators (PSAvoidSemicolonsAsLineTerminators)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.2428283+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":64856,"DiscoveryDuration":0,"UserDuration":21935,"FrameworkDuration":42921},{"Depth":4,"ItemType":"Test","Name":"Avoid Using Broken Hash Algorithms (PSAvoidUsingBrokenHashAlgorithms)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.249413+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":139552,"DiscoveryDuration":0,"UserDuration":107109,"FrameworkDuration":32443},{"Depth":4,"ItemType":"Test","Name":"Avoid Using Cmdlet Aliases or omitting the 'Get-' prefix. (PSAvoidUsingCmdletAliases)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.2634751+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":54415,"DiscoveryDuration":0,"UserDuration":21826,"FrameworkDuration":32589},{"Depth":4,"ItemType":"Test","Name":"Avoid Using Deprecated Manifest Fields (PSAvoidUsingDeprecatedManifestFields)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.2690075+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":53744,"DiscoveryDuration":0,"UserDuration":20632,"FrameworkDuration":33112},{"Depth":4,"ItemType":"Test","Name":"Avoid Using Empty Catch Block (PSAvoidUsingEmptyCatchBlock)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.2744773+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":48356,"DiscoveryDuration":0,"UserDuration":19544,"FrameworkDuration":28812},{"Depth":4,"ItemType":"Test","Name":"Avoid Using Get-WMIObject, Remove-WMIObject, Invoke-WmiMethod, Register-WmiEvent, Set-WmiInstance (PSAvoidUsingWMICmdlet)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.2793997+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":322581,"DiscoveryDuration":0,"UserDuration":92754,"FrameworkDuration":229827},{"Depth":4,"ItemType":"Test","Name":"Avoid Using Invoke-Expression (PSAvoidUsingInvokeExpression)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.3118107+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":67898,"DiscoveryDuration":0,"UserDuration":27165,"FrameworkDuration":40733},{"Depth":4,"ItemType":"Test","Name":"Avoid using null or empty HelpMessage parameter attribute. (PSAvoidNullOrEmptyHelpMessageAttribute)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.318671+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":56503,"DiscoveryDuration":0,"UserDuration":19314,"FrameworkDuration":37189},{"Depth":4,"ItemType":"Test","Name":"Avoid Using Plain Text For Password Parameter (PSAvoidUsingPlainTextForPassword)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.3244061+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":57988,"DiscoveryDuration":0,"UserDuration":19968,"FrameworkDuration":38020},{"Depth":4,"ItemType":"Test","Name":"Avoid Using ShouldContinue Without Boolean Force Parameter (PSAvoidShouldContinueWithoutForce)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.3303125+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":58010,"DiscoveryDuration":0,"UserDuration":19434,"FrameworkDuration":38576},{"Depth":4,"ItemType":"Test","Name":"Avoid Using Write-Host (PSAvoidUsingWriteHost)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.3362137+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":2011942,"DiscoveryDuration":0,"UserDuration":19310,"FrameworkDuration":1992632},{"Depth":4,"ItemType":"Test","Name":"Changing automtic variables might have undesired side effects (PSAvoidAssignmentToAutomaticVariable)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.5375885+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":64860,"DiscoveryDuration":0,"UserDuration":24194,"FrameworkDuration":40666},{"Depth":4,"ItemType":"Test","Name":"Cmdlet Singular Noun (PSUseSingularNouns)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.54417+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":54232,"DiscoveryDuration":0,"UserDuration":18168,"FrameworkDuration":36064},{"Depth":4,"ItemType":"Test","Name":"Cmdlet Verbs (PSUseApprovedVerbs)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.5496873+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":48832,"DiscoveryDuration":0,"UserDuration":17051,"FrameworkDuration":31781},{"Depth":4,"ItemType":"Test","Name":"Create hashtables with literal initializers (PSUseLiteralInitializerForHashtable)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.5546623+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":46255,"DiscoveryDuration":0,"UserDuration":15920,"FrameworkDuration":30335},{"Depth":4,"ItemType":"Test","Name":"Extra Variables (PSUseDeclaredVarsMoreThanAssignments)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.5593451+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":50794,"DiscoveryDuration":0,"UserDuration":17695,"FrameworkDuration":33099},{"Depth":4,"ItemType":"Test","Name":"Misleading Backtick (PSMisleadingBacktick)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.5645521+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":48705,"DiscoveryDuration":0,"UserDuration":17139,"FrameworkDuration":31566},{"Depth":4,"ItemType":"Test","Name":"Module Manifest Fields (PSMissingModuleManifestField)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Skipped","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.5695109+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":60409,"DiscoveryDuration":0,"UserDuration":0,"FrameworkDuration":60409},{"Depth":4,"ItemType":"Test","Name":"No Global Variables (PSAvoidGlobalVars)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.575689+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":53924,"DiscoveryDuration":0,"UserDuration":18276,"FrameworkDuration":35648},{"Depth":4,"ItemType":"Test","Name":"Null Comparison (PSPossibleIncorrectComparisonWithNull)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.5811577+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":50043,"DiscoveryDuration":0,"UserDuration":17405,"FrameworkDuration":32638},{"Depth":4,"ItemType":"Test","Name":"Place close braces (PSPlaceCloseBrace)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.5862829+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":51467,"DiscoveryDuration":0,"UserDuration":17484,"FrameworkDuration":33983},{"Depth":4,"ItemType":"Test","Name":"Place open braces consistently (PSPlaceOpenBrace)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.5915191+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":233219,"DiscoveryDuration":0,"UserDuration":17304,"FrameworkDuration":215915},{"Depth":4,"ItemType":"Test","Name":"Reserved Cmdlet Chars (PSReservedCmdletChar)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.6149905+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":53393,"DiscoveryDuration":0,"UserDuration":20223,"FrameworkDuration":33170},{"Depth":4,"ItemType":"Test","Name":"ReviewUnusedParameter (PSReviewUnusedParameter)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.620404+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":48235,"DiscoveryDuration":0,"UserDuration":17191,"FrameworkDuration":31044},{"Depth":4,"ItemType":"Test","Name":"Should Process (PSShouldProcess)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.6253179+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":47193,"DiscoveryDuration":0,"UserDuration":16009,"FrameworkDuration":31184},{"Depth":4,"ItemType":"Test","Name":"Switch Parameters Should Not Default To True (PSAvoidDefaultValueSwitchParameter)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.6301316+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":46502,"DiscoveryDuration":0,"UserDuration":15966,"FrameworkDuration":30536},{"Depth":4,"ItemType":"Test","Name":"Use 'Using:' scope modifier in RunSpace ScriptBlocks (PSUseUsingScopeModifierInNewRunspaces)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.6348762+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":48419,"DiscoveryDuration":0,"UserDuration":16166,"FrameworkDuration":32253},{"Depth":4,"ItemType":"Test","Name":"Use BOM encoding for non-ASCII files (PSUseBOMForUnicodeEncodedFile)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.6398185+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":49391,"DiscoveryDuration":0,"UserDuration":18044,"FrameworkDuration":31347},{"Depth":4,"ItemType":"Test","Name":"Use Cmdlet Correctly (PSUseCmdletCorrectly)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.6448654+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":47305,"DiscoveryDuration":0,"UserDuration":16285,"FrameworkDuration":31020},{"Depth":4,"ItemType":"Test","Name":"Use compatible cmdlets (PSUseCompatibleCmdlets)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.6496982+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":47982,"DiscoveryDuration":0,"UserDuration":16162,"FrameworkDuration":31820},{"Depth":4,"ItemType":"Test","Name":"Use compatible commands (PSUseCompatibleCommands)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.6546136+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":48143,"DiscoveryDuration":0,"UserDuration":16919,"FrameworkDuration":31224},{"Depth":4,"ItemType":"Test","Name":"Use compatible types (PSUseCompatibleTypes)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.6595153+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":48534,"DiscoveryDuration":0,"UserDuration":16962,"FrameworkDuration":31572},{"Depth":4,"ItemType":"Test","Name":"Use consistent indentation (PSUseConsistentIndentation)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.6644858+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":48591,"DiscoveryDuration":0,"UserDuration":16819,"FrameworkDuration":31772},{"Depth":4,"ItemType":"Test","Name":"Use process block for command that accepts input from pipeline. (PSUseProcessBlockForPipelineCommand)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.6694672+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":61484,"DiscoveryDuration":0,"UserDuration":23811,"FrameworkDuration":37673},{"Depth":4,"ItemType":"Test","Name":"Use PSCredential type. (PSUsePSCredentialType)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.6757023+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":52004,"DiscoveryDuration":0,"UserDuration":15763,"FrameworkDuration":36241},{"Depth":4,"ItemType":"Test","Name":"Use ShouldProcess For State Changing Functions (PSUseShouldProcessForStateChangingFunctions)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.6809838+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":53057,"DiscoveryDuration":0,"UserDuration":16888,"FrameworkDuration":36169},{"Depth":4,"ItemType":"Test","Name":"Use SupportsShouldProcess (PSUseSupportsShouldProcess)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.6863688+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":50046,"DiscoveryDuration":0,"UserDuration":16526,"FrameworkDuration":33520},{"Depth":4,"ItemType":"Test","Name":"Use the *ToExport module manifest fields. (PSUseToExportFieldsInManifest)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Skipped","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.6914539+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":28873,"DiscoveryDuration":0,"UserDuration":0,"FrameworkDuration":28873},{"Depth":4,"ItemType":"Test","Name":"Use UTF8 Encoding For Help File (PSUseUTF8EncodingForHelpFile)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.6944306+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":49223,"DiscoveryDuration":0,"UserDuration":16021,"FrameworkDuration":33202},{"Depth":4,"ItemType":"Test","Name":"Use whitespaces (PSUseConsistentWhitespace)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Warning"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.6994363+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":49646,"DiscoveryDuration":0,"UserDuration":15992,"FrameworkDuration":33654}]],"Result":"Passed","FailedCount":0,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":49,"SkippedCount":2,"InconclusiveCount":0,"NotRunCount":0,"TotalCount":51,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.0430099+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":8892105,"DiscoveryDuration":0,"UserDuration":1791384,"FrameworkDuration":7100721},{"Depth":3,"ItemType":"Block","Name":"Severity: Error","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer"],"Children":[[{"Depth":4,"ItemType":"Test","Name":"Avoid Using ComputerName Hardcoded (PSAvoidUsingComputerNameHardcoded)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Error"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.7097516+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":59672,"DiscoveryDuration":0,"UserDuration":15508,"FrameworkDuration":44164},{"Depth":4,"ItemType":"Test","Name":"Avoid Using SecureString With Plain Text (PSAvoidUsingConvertToSecureStringWithPlainText)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Error"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.7158138+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":50354,"DiscoveryDuration":0,"UserDuration":16115,"FrameworkDuration":34239},{"Depth":4,"ItemType":"Test","Name":"Avoid Using Username and Password Parameters (PSAvoidUsingUsernameAndPasswordParams)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Error"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.7209422+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":50741,"DiscoveryDuration":0,"UserDuration":16261,"FrameworkDuration":34480},{"Depth":4,"ItemType":"Test","Name":"Reserved Parameters (PSReservedParams)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Error"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.7261005+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":49996,"DiscoveryDuration":0,"UserDuration":16380,"FrameworkDuration":33616},{"Depth":4,"ItemType":"Test","Name":"Use compatible syntax (PSUseCompatibleSyntax)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Error"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.731186+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":52396,"DiscoveryDuration":0,"UserDuration":16997,"FrameworkDuration":35399},{"Depth":4,"ItemType":"Test","Name":"Use identical mandatory parameters for DSC Get/Test/Set TargetResource functions (PSDSCUseIdenticalMandatoryParametersForDSC)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Error"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.7365223+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":78924,"DiscoveryDuration":0,"UserDuration":43174,"FrameworkDuration":35750},{"Depth":4,"ItemType":"Test","Name":"Use Identical Parameters For DSC Test and Set Functions (PSDSCUseIdenticalParametersForDSC)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Error"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.7445153+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":64174,"DiscoveryDuration":0,"UserDuration":21308,"FrameworkDuration":42866},{"Depth":4,"ItemType":"Test","Name":"Use Standard Get/Set/Test TargetResource functions in DSC Resource (PSDSCStandardDSCFunctionsInResource)","Path":["PSModuleLint-SourceCode-Windows","PSScriptAnalyzer","PSScriptAnalyzer","Severity: Error"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.7510346+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":52155,"DiscoveryDuration":0,"UserDuration":17070,"FrameworkDuration":35085}]],"Result":"Passed","FailedCount":0,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":8,"SkippedCount":0,"InconclusiveCount":0,"NotRunCount":0,"TotalCount":8,"Executed":true,"ExecutedAt":"2025-04-17T07:28:56.7075846+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":9427729,"DiscoveryDuration":0,"UserDuration":1958312,"FrameworkDuration":7469417}]],"Result":"Passed","FailedCount":0,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":68,"SkippedCount":2,"InconclusiveCount":0,"NotRunCount":0,"TotalCount":70,"Executed":true,"ExecutedAt":"2025-04-17T07:28:53.2657164+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":35009101,"DiscoveryDuration":0,"UserDuration":27348701,"FrameworkDuration":7660400}],"Result":"Passed","FailedCount":0,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":68,"SkippedCount":2,"InconclusiveCount":0,"NotRunCount":0,"TotalCount":70,"Executed":true,"ExecutedAt":"2025-04-17T07:28:53.1685873+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":65190465,"DiscoveryDuration":27111183,"UserDuration":27454501,"FrameworkDuration":10624781}],"Result":"Passed","FailedCount":0,"FailedBlocksCount":0,"FailedContainersCount":0,"PassedCount":68,"SkippedCount":2,"InconclusiveCount":0,"NotRunCount":0,"TotalCount":70,"Executed":true,"ExecutedAt":"2025-04-17T07:28:50.1511592+00:00","Version":"5.7.1","PSVersion":"7.4.7","Plugins":null,"PluginConfiguration":null,"PluginData":null,"Configuration":{"Run":{"Exit":false,"ExcludePath":[],"PassThru":true,"ScriptBlock":[],"SkipRemainingOnFailure":"None","SkipRun":false,"Path":["D:\\a\\Path\\Path\\src"],"Container":[{"Path":"D:\\a\\_actions\\PSModule\\Invoke-ScriptAnalyzer\\v3\\scripts\\tests\\PSScriptAnalyzer\\PSScriptAnalyzer.Tests.ps1","Data":{"Verbose":false,"SettingsFilePath":"D:\\a\\_actions\\PSModule\\Invoke-ScriptAnalyzer\\v3\\scripts\\tests\\PSScriptAnalyzer/SourceCode.Settings.psd1","Path":"D:\\a\\Path\\Path\\src","Debug":false}}],"TestExtension":".Tests.ps1","Throw":false},"Debug":{"ReturnRawResultObject":false,"WriteDebugMessages":false,"ShowNavigationMarkers":false,"ShowFullErrors":false,"WriteDebugMessagesFrom":["Discovery","Skip","Mock","CodeCoverage"]},"Should":{"ErrorAction":"Stop"},"Output":{"StackTraceVerbosity":"Filtered","CIFormat":"GithubActions","RenderMode":"Ansi","Verbosity":"Detailed","CILogLevel":"Error"},"TestDrive":{"Enabled":true},"CodeCoverage":{"OutputEncoding":"UTF8","Enabled":false,"SingleHitBreakpoints":true,"OutputFormat":"JaCoCo","UseBreakpoints":true,"ExcludeTests":true,"OutputPath":"D:\\a\\Path\\Path/CodeCoverage/PSModuleLint-SourceCode-Windows-CodeCoverage-Report.xml","Path":[],"RecursePaths":true,"CoveragePercentTarget":75.0},"Filter":{"FullName":[],"ExcludeLine":[],"Line":[],"ExcludeTag":[],"Tag":[]},"TestRegistry":{"Enabled":true},"TestResult":{"OutputEncoding":"UTF8","OutputFormat":"NUnitXml","TestSuiteName":"PSModuleLint-SourceCode-Windows","Enabled":true,"OutputPath":"D:\\a\\Path\\Path/TestResult/PSModuleLint-SourceCode-Windows-TestResult-Report.xml"}},"Duration":65190465,"DiscoveryDuration":27111183,"UserDuration":27454501,"FrameworkDuration":10624781} diff --git a/tests/TestResults/PSModuleLint-SourceCode-Windows-TestResults/PSModuleLint-SourceCode-Windows-TestResult-Report.xml b/tests/TestResults/PSModuleLint-SourceCode-Windows-TestResults/PSModuleLint-SourceCode-Windows-TestResult-Report.xml new file mode 100644 index 0000000..5206535 --- /dev/null +++ b/tests/TestResults/PSModuleLint-SourceCode-Windows-TestResults/PSModuleLint-SourceCode-Windows-TestResult-Report.xml @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/TestResults/PSModuleTest-Module-Windows-TestResults/PSModuleTest-Module-Windows-TestResult-Report.json b/tests/TestResults/PSModuleTest-Module-Windows-TestResults/PSModuleTest-Module-Windows-TestResult-Report.json new file mode 100644 index 0000000..cc9d169 --- /dev/null +++ b/tests/TestResults/PSModuleTest-Module-Windows-TestResults/PSModuleTest-Module-Windows-TestResult-Report.json @@ -0,0 +1 @@ +{"Depth":0,"ItemType":"TestSuite","Name":"PSModuleTest-Module-Windows","Path":null,"Children":[{"Depth":1,"ItemType":"Container","Name":"PSModule","Path":["PSModuleTest-Module-Windows"],"Children":[{"Depth":2,"ItemType":"Block","Name":"PSModule - Module tests","Path":["PSModuleTest-Module-Windows","PSModule"],"Children":[[{"Depth":3,"ItemType":"Block","Name":"Module","Path":["PSModuleTest-Module-Windows","PSModule","PSModule - Module tests"],"Children":[{"Depth":4,"ItemType":"Test","Name":"The module should be importable","Path":["PSModuleTest-Module-Windows","PSModule","PSModule - Module tests","Module"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:53.1034528+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":2886026,"DiscoveryDuration":0,"UserDuration":2317875,"FrameworkDuration":568151}],"Result":"Passed","FailedCount":0,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":1,"SkippedCount":0,"InconclusiveCount":0,"NotRunCount":0,"TotalCount":1,"Executed":true,"ExecutedAt":"2025-04-17T07:28:53.0954029+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":3149329,"DiscoveryDuration":0,"UserDuration":2323374,"FrameworkDuration":825955},{"Depth":3,"ItemType":"Block","Name":"Module Manifest","Path":["PSModuleTest-Module-Windows","PSModule","PSModule - Module tests"],"Children":[[{"Depth":4,"ItemType":"Test","Name":"Module Manifest exists","Path":["PSModuleTest-Module-Windows","PSModule","PSModule - Module tests","Module Manifest"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:53.4128495+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":300068,"DiscoveryDuration":0,"UserDuration":123483,"FrameworkDuration":176585},{"Depth":4,"ItemType":"Test","Name":"Module Manifest is valid","Path":["PSModuleTest-Module-Windows","PSModule","PSModule - Module tests","Module Manifest"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:53.4430574+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":989896,"DiscoveryDuration":0,"UserDuration":943784,"FrameworkDuration":46112}]],"Result":"Passed","FailedCount":0,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":2,"SkippedCount":0,"InconclusiveCount":0,"NotRunCount":0,"TotalCount":2,"Executed":true,"ExecutedAt":"2025-04-17T07:28:53.4103276+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":4502982,"DiscoveryDuration":0,"UserDuration":3395634,"FrameworkDuration":1107348}]],"Result":"Passed","FailedCount":0,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":3,"SkippedCount":0,"InconclusiveCount":0,"NotRunCount":0,"TotalCount":3,"Executed":true,"ExecutedAt":"2025-04-17T07:28:53.0807015+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":4674678,"DiscoveryDuration":0,"UserDuration":3412755,"FrameworkDuration":1261923}],"Result":"Passed","FailedCount":0,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":3,"SkippedCount":0,"InconclusiveCount":0,"NotRunCount":0,"TotalCount":3,"Executed":true,"ExecutedAt":"2025-04-17T07:28:53.0050202+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":11723166,"DiscoveryDuration":1787284,"UserDuration":3515115,"FrameworkDuration":6420767}],"Result":"Passed","FailedCount":0,"FailedBlocksCount":0,"FailedContainersCount":0,"PassedCount":3,"SkippedCount":0,"InconclusiveCount":0,"NotRunCount":0,"TotalCount":3,"Executed":true,"ExecutedAt":"2025-04-17T07:28:52.2462766+00:00","Version":"5.7.1","PSVersion":"7.4.7","Plugins":null,"PluginConfiguration":null,"PluginData":null,"Configuration":{"TestRegistry":{"Enabled":true},"Run":{"Container":[{"Path":"D:\\a\\_actions\\PSModule\\Test-PSModule\\v3\\scripts\\tests\\Module\\PSModule\\PSModule.Tests.ps1","Data":{"Path":"C:\\Users\\runneradmin\\Documents\\PowerShell\\Modules\\PSModuleTest\\999.0.0","Verbose":false,"Debug":false}}],"Exit":false,"Path":["C:\\Users\\runneradmin\\Documents\\PowerShell\\Modules\\PSModuleTest\\999.0.0"],"ExcludePath":[],"Throw":false,"SkipRemainingOnFailure":"None","TestExtension":".Tests.ps1","SkipRun":false,"ScriptBlock":[],"PassThru":true},"TestDrive":{"Enabled":true},"Debug":{"WriteDebugMessagesFrom":["Discovery","Skip","Mock","CodeCoverage"],"WriteDebugMessages":false,"ReturnRawResultObject":false,"ShowFullErrors":false,"ShowNavigationMarkers":false},"Output":{"StackTraceVerbosity":"Filtered","CILogLevel":"Error","RenderMode":"Ansi","CIFormat":"GithubActions","Verbosity":"Detailed"},"Should":{"ErrorAction":"Stop"},"TestResult":{"OutputPath":"D:\\a\\Path\\Path/TestResult/PSModuleTest-Module-Windows-TestResult-Report.xml","Enabled":true,"OutputEncoding":"UTF8","OutputFormat":"NUnitXml","TestSuiteName":"PSModuleTest-Module-Windows"},"Filter":{"ExcludeLine":[],"Tag":[],"ExcludeTag":[],"Line":[],"FullName":[]},"CodeCoverage":{"OutputFormat":"JaCoCo","Enabled":true,"SingleHitBreakpoints":true,"ExcludeTests":true,"RecursePaths":true,"Path":[],"OutputEncoding":"UTF8","UseBreakpoints":true,"CoveragePercentTarget":80.0,"OutputPath":"D:\\a\\Path\\Path/CodeCoverage/PSModuleTest-Module-Windows-CodeCoverage-Report.xml"}},"Duration":11723166,"DiscoveryDuration":1787284,"UserDuration":3515115,"FrameworkDuration":6420767} diff --git a/tests/TestResults/PSModuleTest-Module-Windows-TestResults/PSModuleTest-Module-Windows-TestResult-Report.xml b/tests/TestResults/PSModuleTest-Module-Windows-TestResults/PSModuleTest-Module-Windows-TestResult-Report.xml new file mode 100644 index 0000000..339d44c --- /dev/null +++ b/tests/TestResults/PSModuleTest-Module-Windows-TestResults/PSModuleTest-Module-Windows-TestResult-Report.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/TestResults/PSModuleTest-SourceCode-Windows-TestResults/PSModuleTest-SourceCode-Windows-TestResult-Report.json b/tests/TestResults/PSModuleTest-SourceCode-Windows-TestResults/PSModuleTest-SourceCode-Windows-TestResult-Report.json new file mode 100644 index 0000000..23677a7 --- /dev/null +++ b/tests/TestResults/PSModuleTest-SourceCode-Windows-TestResults/PSModuleTest-SourceCode-Windows-TestResult-Report.json @@ -0,0 +1 @@ +{"Depth":0,"ItemType":"TestSuite","Name":"PSModuleTest-SourceCode-Windows","Path":null,"Children":[{"Depth":1,"ItemType":"Container","Name":"PSModule","Path":["PSModuleTest-SourceCode-Windows"],"Children":[{"Depth":2,"ItemType":"Block","Name":"PSModule - SourceCode tests","Path":["PSModuleTest-SourceCode-Windows","PSModule"],"Children":[[{"Depth":3,"ItemType":"Block","Name":"General tests","Path":["PSModuleTest-SourceCode-Windows","PSModule","PSModule - SourceCode tests"],"Children":[[{"Depth":4,"ItemType":"Test","Name":"Should use '[System.Environment]::ProcessorCount' instead of '$env:NUMBER_OF_PROCESSORS' (ID: NumberOfProcessors)","Path":["PSModuleTest-SourceCode-Windows","PSModule","PSModule - SourceCode tests","General tests"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:08.8473617+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":1149421,"DiscoveryDuration":0,"UserDuration":563957,"FrameworkDuration":585464},{"Depth":4,"ItemType":"Test","Name":"Should not contain '-Verbose' unless it is disabled using ':$false' qualifier after it (ID: Verbose)","Path":["PSModuleTest-SourceCode-Windows","PSModule","PSModule - SourceCode tests","General tests"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:08.9615276+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":134940,"DiscoveryDuration":0,"UserDuration":90728,"FrameworkDuration":44212},{"Depth":4,"ItemType":"Test","Name":"Should use '$null = ...' instead of '... | Out-Null' (ID: OutNull)","Path":["PSModuleTest-SourceCode-Windows","PSModule","PSModule - SourceCode tests","General tests"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:08.9751332+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":123736,"DiscoveryDuration":0,"UserDuration":81899,"FrameworkDuration":41837},{"Depth":4,"ItemType":"Test","Name":"Should not use ternary operations for compatability reasons (ID: NoTernary)","Path":["PSModuleTest-SourceCode-Windows","PSModule","PSModule - SourceCode tests","General tests"],"Result":"Skipped","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:08.9876563+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":76730,"DiscoveryDuration":0,"UserDuration":0,"FrameworkDuration":76730},{"Depth":4,"ItemType":"Test","Name":"all powershell keywords are lowercase (ID: LowercaseKeywords)","Path":["PSModuleTest-SourceCode-Windows","PSModule","PSModule - SourceCode tests","General tests"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:08.9954268+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":396747,"DiscoveryDuration":0,"UserDuration":313119,"FrameworkDuration":83628}]],"Result":"Passed","FailedCount":0,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":4,"SkippedCount":1,"InconclusiveCount":0,"NotRunCount":0,"TotalCount":5,"Executed":true,"ExecutedAt":"2025-04-17T07:28:08.81687+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":2421783,"DiscoveryDuration":0,"UserDuration":1057384,"FrameworkDuration":1364399},{"Depth":3,"ItemType":"Block","Name":"functions","Path":["PSModuleTest-SourceCode-Windows","PSModule","PSModule - SourceCode tests"],"Children":[[{"Depth":4,"ItemType":"Block","Name":"Generic","Path":["PSModuleTest-SourceCode-Windows","PSModule","PSModule - SourceCode tests","functions"],"Children":[[{"Depth":5,"ItemType":"Test","Name":"Should contain one function or filter (ID: FunctionCount)","Path":["PSModuleTest-SourceCode-Windows","PSModule","PSModule - SourceCode tests","functions","Generic"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:09.1105097+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":251570,"DiscoveryDuration":0,"UserDuration":183835,"FrameworkDuration":67735},{"Depth":5,"ItemType":"Test","Name":"Should have matching filename and function/filter name (ID: FunctionName)","Path":["PSModuleTest-SourceCode-Windows","PSModule","PSModule - SourceCode tests","functions","Generic"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:09.1357799+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":288523,"DiscoveryDuration":0,"UserDuration":246000,"FrameworkDuration":42523},{"Depth":5,"ItemType":"Test","Name":"Should have [CmdletBinding()] attribute (ID: CmdletBinding)","Path":["PSModuleTest-SourceCode-Windows","PSModule","PSModule - SourceCode tests","functions","Generic"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:09.1647516+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":652737,"DiscoveryDuration":0,"UserDuration":608171,"FrameworkDuration":44566},{"Depth":5,"ItemType":"Test","Name":"Should have a param() block (ID: ParamBlock)","Path":["PSModuleTest-SourceCode-Windows","PSModule","PSModule - SourceCode tests","functions","Generic"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:09.2301473+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":246918,"DiscoveryDuration":0,"UserDuration":203187,"FrameworkDuration":43731}]],"Result":"Passed","FailedCount":0,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":4,"SkippedCount":0,"InconclusiveCount":0,"NotRunCount":0,"TotalCount":4,"Executed":true,"ExecutedAt":"2025-04-17T07:28:09.0616432+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":1962773,"DiscoveryDuration":0,"UserDuration":1420753,"FrameworkDuration":542020},{"Depth":4,"ItemType":"Block","Name":"public functions","Path":["PSModuleTest-SourceCode-Windows","PSModule","PSModule - SourceCode tests","functions"],"Children":[{"Depth":5,"ItemType":"Test","Name":"All public functions/filters have tests (ID: FunctionTest)","Path":["PSModuleTest-SourceCode-Windows","PSModule","PSModule - SourceCode tests","functions","public functions"],"Result":"Passed","FailedCount":null,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":null,"SkippedCount":null,"InconclusiveCount":null,"NotRunCount":null,"TotalCount":null,"Executed":true,"ExecutedAt":"2025-04-17T07:28:09.2725803+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":726150,"DiscoveryDuration":0,"UserDuration":657649,"FrameworkDuration":68501}],"Result":"Passed","FailedCount":0,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":1,"SkippedCount":0,"InconclusiveCount":0,"NotRunCount":0,"TotalCount":1,"Executed":true,"ExecutedAt":"2025-04-17T07:28:09.2579569+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":2893019,"DiscoveryDuration":0,"UserDuration":2203895,"FrameworkDuration":689124}]],"Result":"Passed","FailedCount":0,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":5,"SkippedCount":0,"InconclusiveCount":0,"NotRunCount":0,"TotalCount":5,"Executed":true,"ExecutedAt":"2025-04-17T07:28:09.0590669+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":5379641,"DiscoveryDuration":0,"UserDuration":3267012,"FrameworkDuration":2112629}]],"Result":"Passed","FailedCount":0,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":9,"SkippedCount":1,"InconclusiveCount":0,"NotRunCount":0,"TotalCount":10,"Executed":true,"ExecutedAt":"2025-04-17T07:28:08.8020098+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":5566571,"DiscoveryDuration":0,"UserDuration":3285889,"FrameworkDuration":2280682}],"Result":"Passed","FailedCount":0,"FailedBlocksCount":null,"FailedContainersCount":null,"PassedCount":9,"SkippedCount":1,"InconclusiveCount":0,"NotRunCount":0,"TotalCount":10,"Executed":true,"ExecutedAt":"2025-04-17T07:28:08.6830269+00:00","Version":null,"PSVersion":null,"Plugins":null,"PluginConfiguration":null,"PluginData":null,"Duration":11549909,"DiscoveryDuration":2041719,"UserDuration":3783677,"FrameworkDuration":5724513}],"Result":"Passed","FailedCount":0,"FailedBlocksCount":0,"FailedContainersCount":0,"PassedCount":9,"SkippedCount":1,"InconclusiveCount":0,"NotRunCount":0,"TotalCount":10,"Executed":true,"ExecutedAt":"2025-04-17T07:28:08.2021683+00:00","Version":"5.7.1","PSVersion":"7.4.7","Plugins":null,"PluginConfiguration":null,"PluginData":null,"Configuration":{"Run":{"Path":["D:\\a\\Path\\Path\\src"],"SkipRun":false,"ExcludePath":[],"ScriptBlock":[],"Throw":false,"SkipRemainingOnFailure":"None","Exit":false,"TestExtension":".Tests.ps1","PassThru":true,"Container":[{"Path":"D:\\a\\_actions\\PSModule\\Test-PSModule\\v3\\scripts\\tests\\SourceCode\\PSModule\\PSModule.Tests.ps1","Data":{"Path":"D:\\a\\Path\\Path\\src","TestsPath":"D:\\a\\Path\\Path\\tests","Verbose":false,"Debug":false}}]},"Debug":{"ReturnRawResultObject":false,"WriteDebugMessages":false,"WriteDebugMessagesFrom":["Discovery","Skip","Mock","CodeCoverage"],"ShowFullErrors":false,"ShowNavigationMarkers":false},"Should":{"ErrorAction":"Stop"},"TestResult":{"OutputPath":"D:\\a\\Path\\Path/TestResult/PSModuleTest-SourceCode-Windows-TestResult-Report.xml","Enabled":true,"OutputFormat":"NUnitXml","OutputEncoding":"UTF8","TestSuiteName":"PSModuleTest-SourceCode-Windows"},"Output":{"Verbosity":"Detailed","RenderMode":"Ansi","CIFormat":"GithubActions","StackTraceVerbosity":"Filtered","CILogLevel":"Error"},"CodeCoverage":{"Path":[],"OutputPath":"D:\\a\\Path\\Path/CodeCoverage/PSModuleTest-SourceCode-Windows-CodeCoverage-Report.xml","UseBreakpoints":true,"RecursePaths":true,"OutputEncoding":"UTF8","CoveragePercentTarget":75.0,"Enabled":false,"SingleHitBreakpoints":true,"OutputFormat":"JaCoCo","ExcludeTests":true},"TestDrive":{"Enabled":true},"Filter":{"Tag":[],"ExcludeTag":[],"FullName":[],"Line":[],"ExcludeLine":[]},"TestRegistry":{"Enabled":true}},"Duration":11549909,"DiscoveryDuration":2041719,"UserDuration":3783677,"FrameworkDuration":5724513} diff --git a/tests/TestResults/PSModuleTest-SourceCode-Windows-TestResults/PSModuleTest-SourceCode-Windows-TestResult-Report.xml b/tests/TestResults/PSModuleTest-SourceCode-Windows-TestResults/PSModuleTest-SourceCode-Windows-TestResult-Report.xml new file mode 100644 index 0000000..c62d67e --- /dev/null +++ b/tests/TestResults/PSModuleTest-SourceCode-Windows-TestResults/PSModuleTest-SourceCode-Windows-TestResult-Report.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From f0233d5ee1b770efa5053d8084fc3a7f77496b1d Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Thu, 17 Apr 2025 11:43:07 +0200 Subject: [PATCH 52/54] Refactor: Update artifact paths in Action-Test.yml to correct directory structure --- .github/workflows/Action-Test.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/Action-Test.yml b/.github/workflows/Action-Test.yml index ef2f4dc..5f64bce 100644 --- a/.github/workflows/Action-Test.yml +++ b/.github/workflows/Action-Test.yml @@ -30,31 +30,31 @@ jobs: uses: actions/upload-artifact@v4 with: name: PATH-Windows-TestResults - path: ./tests/PATH-Windows-TestResults + path: ./tests/TestResults/PATH-Windows-TestResults retention-days: 1 - name: Upload artifact [PSModuleLint-Module-Windows-TestResults] uses: actions/upload-artifact@v4 with: name: PSModuleLint-Module-Windows-TestResults - path: ./tests/PSModuleLint-Module-Windows-TestResults + path: ./tests/TestResults/PSModuleLint-Module-Windows-TestResults retention-days: 1 - name: Upload artifact [PSModuleLint-SourceCode-Windows-TestResults] uses: actions/upload-artifact@v4 with: name: PSModuleLint-SourceCode-Windows-TestResults - path: ./tests/PSModuleLint-SourceCode-Windows-TestResults + path: ./tests/TestResults/PSModuleLint-SourceCode-Windows-TestResults retention-days: 1 - name: Upload artifact [PSModuleTest-Module-Windows-TestResults] uses: actions/upload-artifact@v4 with: name: PSModuleTest-Module-Windows-TestResults - path: ./tests/PSModuleTest-Module-Windows-TestResults + path: ./tests/TestResults/PSModuleTest-Module-Windows-TestResults retention-days: 1 - name: Upload artifact [PSModuleTest-SourceCode-Windows-TestResults] uses: actions/upload-artifact@v4 with: name: PSModuleTest-SourceCode-Windows-TestResults - path: ./tests/PSModuleTest-SourceCode-Windows-TestResults + path: ./tests/TestResults/PSModuleTest-SourceCode-Windows-TestResults retention-days: 1 - name: Action-Test @@ -63,4 +63,3 @@ jobs: SourceCodeTestSuites: '[{"OSName": "Windows"}' PSModuleTestSuites: '[{"OSName": "Windows"}]' ModuleTestSuites: '[{"TestName": "PATH", "OSName": "Windows"}]' - WorkingDirectory: './tests' From 5c11ad5890406d3f9d58609c1bd2f2e2fafad558 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Thu, 17 Apr 2025 11:44:09 +0200 Subject: [PATCH 53/54] Refactor: Add if-no-files-found error handling for artifact uploads in Action-Test.yml --- .github/workflows/Action-Test.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/Action-Test.yml b/.github/workflows/Action-Test.yml index 5f64bce..639cd78 100644 --- a/.github/workflows/Action-Test.yml +++ b/.github/workflows/Action-Test.yml @@ -32,30 +32,39 @@ jobs: name: PATH-Windows-TestResults path: ./tests/TestResults/PATH-Windows-TestResults retention-days: 1 + if-no-files-found: error + - name: Upload artifact [PSModuleLint-Module-Windows-TestResults] uses: actions/upload-artifact@v4 with: name: PSModuleLint-Module-Windows-TestResults path: ./tests/TestResults/PSModuleLint-Module-Windows-TestResults retention-days: 1 + if-no-files-found: error + - name: Upload artifact [PSModuleLint-SourceCode-Windows-TestResults] uses: actions/upload-artifact@v4 with: name: PSModuleLint-SourceCode-Windows-TestResults path: ./tests/TestResults/PSModuleLint-SourceCode-Windows-TestResults retention-days: 1 + if-no-files-found: error + - name: Upload artifact [PSModuleTest-Module-Windows-TestResults] uses: actions/upload-artifact@v4 with: name: PSModuleTest-Module-Windows-TestResults path: ./tests/TestResults/PSModuleTest-Module-Windows-TestResults retention-days: 1 + if-no-files-found: error + - name: Upload artifact [PSModuleTest-SourceCode-Windows-TestResults] uses: actions/upload-artifact@v4 with: name: PSModuleTest-SourceCode-Windows-TestResults path: ./tests/TestResults/PSModuleTest-SourceCode-Windows-TestResults retention-days: 1 + if-no-files-found: error - name: Action-Test uses: ./ From 1c3c5187310b0f43d26a02e6fe4c499da895d48a Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Thu, 17 Apr 2025 11:48:26 +0200 Subject: [PATCH 54/54] Refactor: Update comment formatting and suppress Write-Host warnings in main.ps1 --- scripts/main.ps1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/main.ps1 b/scripts/main.ps1 index c664c26..14da9fa 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -1,5 +1,9 @@ -#Requires -Modules GitHub +#Requires -Modules GitHub +[Diagnostics.CodeAnalysis.SuppressMessageAttribute( + 'PSAvoidUsingWriteHost', '', + Justification = 'Outputs to GitHub Actions logs.' +)] [CmdletBinding()] param()