Skip to content

Commit

Permalink
Add test results to verbose in case of errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Fleid committed Apr 7, 2020
1 parent b01614b commit db5019a
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions asa.unittest/Public/Start-AutRun.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,17 @@ Function Start-AutRun{
################################################################################################################################

# Final result
if ($errorCounter -gt 0) {Write-Verbose "Ending Test Run with $errorCounter errors"}
if ($errorCounter -gt 0) {throw("Ending Test Run with $errorCounter errors")}
if ($errorCounter -gt 0) {
Write-Verbose "Ending Test Run with $errorCounter errors"
ForEach ($testCase in $testCases) {
$result = Get-Content "$solutionPath\$unittestFolder\3_assert\$testID\$testCase\*.Result.txt"
if ($result.Trim()) {
Write-Verbose $testCase
Write-Verbose "$result"
}
}
throw("Ending Test Run with $errorCounter errors")
}

} #ShouldProcess
} #PROCESS
Expand Down

0 comments on commit db5019a

Please sign in to comment.