代码拉取完成,页面将自动刷新
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- master
pool:
vmImage: ubuntu-latest
steps:
- script: echo Hello, world!
displayName: 'Run a one-line script'
- script: |
echo Add other tasks to build, test, and deploy your project.
echo See https://aka.ms/yaml
displayName: 'Run a multi-line script'
- script: |
wget -c https://apache.newfountain.nl//jmeter/binaries/apache-jmeter-5.4.1.tgz
tar -xf apache-jmeter-5.4.1.tgz
displayName: 'Install the JMeter packages'
- script: |
apache-jmeter-5.4.1/bin/./jmeter -Jjmeter.reportgenerator.overall_granularity=1000 -n -t DevOpsToolsTestPlan.jmx -l results/results.jtl -j results/output.log -e -o report
displayName: 'Run JMeter Test'
- script: |
ls -l
pwd
displayName: 'PWD'
- script: |
JMETER_RESULTS=results/results.jtl
JUNIT_RESULTS=output.xml
python3 jtl_junit_converter.py $JMETER_RESULTS $JUNIT_RESULTS
displayName: 'RESULTS: Convert JMeter Results to JUnit Format'
- task: PublishTestResults@2
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: 'output.xml'
failTaskOnFailedTests: true
displayName: 'RESULTS: Publish Load Testing Results'
- publish: $(System.DefaultWorkingDirectory)/results
artifact: jmeter-results
condition: succeededOrFailed()
displayName: 'RESULTS: Publish Load Test Artifacts'
- task: PublishPipelineArtifact@1
displayName: 'Publish JMeter HTML Report'
inputs:
targetPath: report
artifact: jmeter-report
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。