Created
January 5, 2022 10:21
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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