带有E2E测试结果的Azure Devops中的魅力报告

发布于 2025-02-03 10:14:08 字数 632 浏览 3 评论 0原文

我正在使用带有剧作剧作E2E测试的Azure Devops,但是我不知道如何在管道中发布魅力报告(Local是很好),

我安装了扩展程序,管道很好,只是没有生成的Allurate Allur Report 我的YML的一部分:

jobs:
- job: AutomatedTests
  steps:
  - task: NodeTool@0
    inputs:
      versionSpec: '14.x'
      cache: 'npm'
    displayName: 'Install Node.js'

  - script: npm install
  - script: npx playwright install --with-deps

    displayName: "run the test"
    condition: succeeded()
  - script: npm run smoke
  - script: npm run generate

  - task: AllureGenerate
    inputs:
      resultsDir: 'allure-results'
      targetDir: 'allure-report/$(Build.BuildNumber)'

有人可以帮我吗?

I am using azure devops with playwright e2e tests, but I do not know how could I publish the allure report inside the pipeline (local is good)

I installed the extension, the pipeline is good just no generate allur report
part of my yml:

jobs:
- job: AutomatedTests
  steps:
  - task: NodeTool@0
    inputs:
      versionSpec: '14.x'
      cache: 'npm'
    displayName: 'Install Node.js'

  - script: npm install
  - script: npx playwright install --with-deps

    displayName: "run the test"
    condition: succeeded()
  - script: npm run smoke
  - script: npm run generate

  - task: AllureGenerate
    inputs:
      resultsDir: 'allure-results'
      targetDir: 'allure-report/$(Build.BuildNumber)'

Can anybody help me pls?Thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

囚我心虐我身 2025-02-10 10:14:09

鉴于您以兼容的框架类型导出测试结果,因此可以使用PublishTestResults任务来完成您需要的工作。 MergetestResults如果您需要上传多个结果文件,则应使用。

- task: PublishTestResults@2
  displayName: publish unit test results
  inputs:
    testResultsFormat: 'VSTest'
    testResultsFiles: 'file*.extension'
    searchFolder: 'allure-report/$(Build.BuildNumber)'
    testRunTitle: Unit test results for $(Build.BuildNumber)
    buildConfiguration: debug
    mergeTestResults: true

根据您的出口格式,您应该在
'junit'#选项:junit,nunit,vstest,xunit,ctest

https://learn.microsoft.com/en-us/en-us/azure/azure/azure/devops/devops/pipelines/pipelines/tasks/tasks/test/发布测试率 - view = azure-devops& tabs = trx%2cyaml

Given that you export your test results in a compatible framework type, you could use the PublishTestResults task to do what you need. mergeTestResults should be used if you have more than one result file that you need to be uploaded.

- task: PublishTestResults@2
  displayName: publish unit test results
  inputs:
    testResultsFormat: 'VSTest'
    testResultsFiles: 'file*.extension'
    searchFolder: 'allure-report/$(Build.BuildNumber)'
    testRunTitle: Unit test results for $(Build.BuildNumber)
    buildConfiguration: debug
    mergeTestResults: true

Based on your export format you should select between
'JUnit' # Options: JUnit, NUnit, VSTest, xUnit, cTest

https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/test/publish-test-results?view=azure-devops&tabs=trx%2Cyaml

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文