Handle Failures/Results with Azure ADO #2168
-
I'm trying to understand failure handling with pester; here is what I want to do: Inside the 'IT' I have a test that calls a function to confirm a location. Inside that function I have a try catch loop as well as retry loop. This allows me to catch the failure if the command fails or if the value were trying to get cannot be found. For example the DB does not have the data we would retry 5 times every 10 seconds.
What I'm seeing is that if all the tests pass and have no failures in my try catch there are no issues Now if I get a failure in the assertion or if a failure occurs in the function try/catch or retry loop then I never get any test results. Here is the failure on the test ##[error] [-] Confirm location 2.88s (2.88s|3ms) here he the tests output Tests completed in 80.44s ##[error]PowerShell exited with code '1'. Looking in my ADO results it never tries to parse the results. I get no errors about no files so thats not the issue: ADO task
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Dang it... Fixed noticed my ADO config was misaligned
|
Beta Was this translation helpful? Give feedback.
Dang it... Fixed noticed my ADO config was misaligned
inputs:
testResultsFormat: 'NUnit'
testResultsFiles: '**/Test-Pester.XML'
condition: succeededOrFailed() <------- Was in the wrong spot under inputs :(