【发布时间】:2021-03-17 07:46:08
【问题描述】:
我正在尝试通过 Azure 管道在我的自托管 VM 中执行 Selenium 测试。我收到以下错误消息。
##[错误]架构 x64 的版本规范 3.8 与 Agent.ToolsDirectory 中的任何版本都不匹配。
下面是我的 Yaml
trigger:
- main
pool: default strategy: matrix:
Python38:
python.version: '3.8'
addToPath: true
steps:
- task: UsePythonVersion@0 inputs:
versionSpec: '$(python.version)'
addToPath: true
architecture: 'x64' displayName: 'Use Python $(python.version)'
- script: |
python -m pip install --upgrade pip
pip install -r requirements.txt displayName: 'Install dependencies'
- script: |
pip install pytest-azurepipelines
pytest tests\test_smoke\test_suite_SmokeTest.py -s -v --browser Chrome --html=report.html --reruns 2 displayName: 'pytest'
- task: DownloadPipelineArtifact@2 inputs:
buildType: 'specific'
project: '8801f21d-f4e9-4b65-b01e-68baf825747c'
definition: '5'
buildVersionToDownload: 'latest'
targetPath: '$(Pipeline.Workspace)'
【问题讨论】:
-
对于 Ubuntu 设置,请参阅此答案:stackoverflow.com/questions/64212888/…
标签: python-3.x selenium-webdriver azure-devops azure-pipelines azure-virtual-machine