Skip to content

Instantly share code, notes, and snippets.

@heoelri
Created January 5, 2022 10:21
Show Gist options
  • Save heoelri/17c27de5ab353f35f59f929eb21cc974 to your computer and use it in GitHub Desktop.
Save heoelri/17c27de5ab353f35f59f929eb21cc974 to your computer and use it in GitHub Desktop.
This YAML pipeline template calls a powershell script to analyze our locust results
parameters:
- name: customPrefix
type: string
default: ""
- name: statsPath # this directory path contains the locust *_stats.csv
type: string
steps:
- task: PowerShell@2
displayName: "Analyze Results from the load and chaos tests"
continueOnError: true
inputs:
targetType: inline
script: |
# load compare-locuststats powershell script
. ./.ado/scripts/Compare-LocustStats.ps1
$baselinePath = "./.ado/pipelines/config/loadtest-baseline.json"
echo "*** Using load test baseline $baselinePath"
$statsPath = "${{ parameters.statsPath }}/${{ parameters.customPrefix }}_stats.csv"
echo "*** Loading load test stats from pipeline artifacts $statsPath"
$result = Compare-LocustStats -baselineFile $baselinePath -statsFile $statsPath -Verbose
if ($result -gt 0) {
throw "*** Load test results failed baseline comparison."
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment