我在为我的剧作家测试创建一个Azure管道时卡住了。我希望测试按特定顺序进行。
这就是我的YAML文件现在的样子,但现在它只是以不正确的顺序运行所有测试。
trigger:
- main
pool:
vmImage: ubuntu-latest
steps:
- task: NodeTool@0
inputs:
versionSpec: '18'
displayName: 'Install Node.js'
- script: npm ci
displayName: 'npm ci'
- script: npx playwright install --with-deps
displayName: 'Install Playwright browsers'
- script: npx playwright test
displayName: 'Run Playwright tests'
- task: PublishTestResults@2
displayName: 'Publish test results'
inputs:
searchFolder: 'test-results'
testResultsFormat: 'JUnit'
testResultsFiles: 'e2e-junit-results.xml'
mergeTestResults: true
failTaskOnFailedTests: true
testRunTitle: 'My End-To-End Tests'
condition: succeededOrFailed()
- task: PublishPipelineArtifact@1
inputs:
targetPath: playwright-report
artifact: playwright-report
publishLocation: 'pipeline'
condition: succeededOrFailed()
字符串
这是我的结构。例如,我想先运行createTraveler.spec.ts,然后再运行createSingleTrip
我试过写作
- script: |
npx jest ./Digor.Web/playwright-tests/createTraveler.spec.ts
displayName: 'Run createTraveler.spec.ts'
- script: |
npx jest ./Digor.Web/playwright-tests/createSingleTrip.spec.ts
displayName: 'Run createSingleTrip.spec.ts'
型
但似乎不起作用。
1条答案
按热度按时间qzlgjiam1#
我克隆了this存储库,并尝试以特定顺序运行测试文件。
x1c 0d1x的数据
我的Yaml代码:-
字符串
的
您可以参考此link,通过指定过滤器以不同的顺序运行npx playwright命令。
型
型