|
| 1 | +trigger: none |
| 2 | + |
| 3 | +parameters: |
| 4 | + - name: scenarios |
| 5 | + type: object |
| 6 | + default: |
| 7 | + - mode: 'startUnattended' |
| 8 | + processKey: '23899934-E6C1-4055-A481-66C0F890FD47' |
| 9 | + solutionProjectId: '' |
| 10 | + inputArguments: '{\"longString\":\"test\"}' |
| 11 | + folderId: '297704' |
| 12 | + duration: '1s' |
| 13 | + rate: '1' |
| 14 | + timeUnit: '1s' |
| 15 | + preAllocatedVUs: '1200' |
| 16 | + maxVUs: '1200' |
| 17 | + testId: 'Simple_Agent_Unattended' |
| 18 | + dependsOn: [] |
| 19 | + - mode: 'startPlayground' |
| 20 | + processKey: '' |
| 21 | + solutionProjectId: '48d96482-dfe2-48eb-9361-6eb5fe78bb91' |
| 22 | + inputArguments: '{\"longString\":\"test\"}' |
| 23 | + folderId: '297721' |
| 24 | + duration: '1s' |
| 25 | + rate: '1' |
| 26 | + preAllocatedVUs: '1200' |
| 27 | + maxVUs: '1200' |
| 28 | + testId: 'Simple_Agent_Playground' |
| 29 | + dependsOn: 'Simple_Agent_Unattended' |
| 30 | + - name: cloudEnvironment |
| 31 | + type: string |
| 32 | + default: 'staging' |
| 33 | + - name: organizationName |
| 34 | + type: string |
| 35 | + default: 'testcloudperformance' |
| 36 | + - name: organizationId |
| 37 | + type: string |
| 38 | + default: 'c0c241d2-01e4-4c55-82fa-2f70083dd89e' |
| 39 | + - name: tenantName |
| 40 | + type: string |
| 41 | + default: 'aop_03_alex_groza' |
| 42 | + - name: tenantId |
| 43 | + type: string |
| 44 | + default: '11cb2dc5-c10f-4f0c-a5b1-ac238eb27507' |
| 45 | + - name: haltWaitThreshold |
| 46 | + type: string |
| 47 | + default: '5' |
| 48 | + - name: socketTimeoutMinutes |
| 49 | + type: string |
| 50 | + default: '5' |
| 51 | + |
| 52 | + |
| 53 | +pool: |
| 54 | + name: 'Agents-Perf-Test-Pool' |
| 55 | + |
| 56 | +stages: |
| 57 | + - stage: PerformanceTests |
| 58 | + displayName: Run Performance Tests |
| 59 | + jobs: |
| 60 | + - ${{ each scenario in parameters.scenarios }}: |
| 61 | + - job: ${{ scenario.testId }} |
| 62 | + timeoutInMinutes: 0 |
| 63 | + displayName: Run ${{ scenario.agent }} in ${{ scenario.mode }} mode |
| 64 | + dependsOn: |
| 65 | + - ${{ scenario.dependsOn }} |
| 66 | + steps: |
| 67 | + - task: PowerShell@2 |
| 68 | + displayName: 'Run ${{ scenario.agent }} in ${{ scenario.mode }} mode' |
| 69 | + inputs: |
| 70 | + targetType: 'inline' |
| 71 | + script: | |
| 72 | + Set-Location -Path "$(Build.SourcesDirectory)/performance" |
| 73 | + $env:PERF_USERNAME='$(username)' |
| 74 | + $env:PERF_PASSWORD='$(password)' |
| 75 | + $env:MODE='${{ scenario.mode }}' |
| 76 | + $env:PROCESS_KEY='${{ scenario.processKey }}' |
| 77 | + $env:SOLUTION_PROJECT_ID='${{ scenario.solutionProjectId }}' |
| 78 | + $env:INPUT_ARGUMENTS='${{ scenario.inputArguments }}' |
| 79 | + $env:FOLDER_ID='${{ scenario.folderId }}' |
| 80 | + $env:DURATION='${{ scenario.duration }}' |
| 81 | + $env:RATE='${{ scenario.rate }}' |
| 82 | + $env:TIME_UNIT='${{ scenario.timeUnit }}' |
| 83 | + $env:PRE_ALLOCATED_VUS='${{ scenario.preAllocatedVUs }}' |
| 84 | + $env:MAX_VUS='${{ scenario.maxVUs }}' |
| 85 | + $env:CLOUD_ENVIRONMENT='${{ parameters.cloudEnvironment }}' |
| 86 | + $env:ORGANIZATION_NAME='${{ parameters.organizationName }}' |
| 87 | + $env:ORGANIZATION_ID='${{ parameters.organizationId }}' |
| 88 | + $env:TENANT_NAME='${{ parameters.tenantName }}' |
| 89 | + $env:TENANT_ID='${{ parameters.tenantId }}' |
| 90 | + $env:HALT_WAIT_THRESHOLD='${{ parameters.haltWaitThreshold }}' |
| 91 | + $env:SOCKET_TIMEOUT_MINUTES='${{ parameters.socketTimeoutMinutes }}' |
| 92 | + ./run.ps1 |
| 93 | + continueOnError: true |
| 94 | + |
| 95 | + - task: PublishBuildArtifacts@1 |
| 96 | + displayName: 'Publish Results' |
| 97 | + inputs: |
| 98 | + PathtoPublish: '$(Build.SourcesDirectory)/performance/results' |
| 99 | + ArtifactName: '${{ scenario.testId }}' |
0 commit comments