trigger: none pool: vmImage: 'ubuntu-18.04' parameters: - name: neoloadApiUrl type: string default: 'https://neoload-api.saas.neotys.com/' - name: neoloadToken type: string default: '8843b9a74a57b8b37f3d5c37306c265142bf253d29b0408c' - name: zoneId type: string default: 'defaultzone' # create sidecar containers, attach them to a zone; provide supply this pipeline demands resources: containers: - container: neoload_ctrl image: neotys/neoload-controller:latest env: { MODE: Managed, NEOLOADWEB_TOKEN: '${{parameters.neoloadToken}}', ZONE: '${{parameters.zoneId}}' } - container: lg1 image: neotys/neoload-loadgenerator:latest env: { NEOLOADWEB_TOKEN: '${{parameters.neoloadToken}}', ZONE: '${{parameters.zoneId}}', LG_HOST=lg1, LG_PORT=7101, AGENT_SERVER_PORT=7101 } jobs: - job: RunLoadTest displayName: Start infrastructure and run NeoLoad Test from Azure Devops services: neoload_ctrl: neoload_ctrl lg1: lg1 steps: - task: UsePythonVersion@0 inputs: versionSpec: '3.8' - task: Bash@3 displayName: Install NeoLoad continueOnError: false inputs: targetType: 'inline' script: | pip install neoload neoload --version - task: Bash@3 displayName: Configure the NeoLoad test continueOnError: true inputs: targetType: 'inline' script: | neoload login --url ${{parameters.neoloadApiUrl}} ${{parameters.neoloadToken}} \ test-settings use cce749a3-d561-4f53-84aa-baddfd230b3c - task: Bash@3 displayName: Run the NeoLoad test continueOnError: true inputs: targetType: 'inline' script: | neoload run FirstTest1 --name "Azure pipeline performance regression task $(Build.BuildNumber)" \ --external-url "$(Build.BuildUri)" \ --external-url-label "Azure CI build $(Build.BuildNumber)" \ --description "Azure result description" \ "My Azure Test With CLI" - task: Bash@3 displayName: Get the junit SLA report continueOnError: true inputs: targetType: 'inline' script: | neoload test-results --junit-file $(Common.TestResultsDirectory)/neoload-slas.xml junitsla - task: PublishTestResults@2 inputs: testResultsFormat: 'JUnit' testResultsFiles: $(Common.TestResultsDirectory)/neoload-slas.xml failTaskOnFailedTests: true