SHARE
TWEET

Untitled

a guest Nov 15th, 2017 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $successPattern = "<status status=""FAIL"""
  2. $Matches = select-string -Pattern $successPattern -Path 'C:\agent\_work\_robotframework\Output\output.xml'
  3. $errorCount = $Matches.Matches.Count
  4. if ($errorCount -ne 0) {
  5.     Write-Host "##vso[task.logissue type=error;]There are $errorCount errors in the Robot Framework tests"
  6.     #exit 1 # decided I won't have it stop. Instead I'll have it as a partial pass
  7. }
RAW Paste Data
Top