目前使用AzureDevops管理项目,想要把robotframework的自动化脚本整合到CD中去,想问一下有没有知道怎么在Pipeline配置代理/环境/运行脚本呢?有偿,帮助解决问题的可以增加悬赏,谢谢!!
从网上搜的Yaml文档
# Python package
# Create and test a Python package on multiple Python versions.
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
trigger:
- master
jobs:
- job: 'Test'
pool:
vmImage: 'vs2017-win2016'
strategy:
matrix:
Python37:
python.version: '3.7'
maxParallel: 1
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
architecture: 'x64'
- script: pip install robotframework robotframework-seleniumlibrary && npm install chromedriver
displayName: 'Install dependencies'
- powershell: robot --pythonpath . -x outputxunit.xml TestCases.robot
displayName: 'Run Robot Scripts'
- task: PublishTestResults@2
inputs:
testResultsFiles: outputxunit.xml
searchFolder: 'D:\a\1\s\'
condition: succeededOrFailed()
displayName: 'Publish Test Results outputxunit.xml'