You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

关于Allure测试报告的历史趋势展示与邮件推送等问题咨询

Answers to Your Allure + WebdriverIO Questions

1. Can Allure send test reports via email or share them internally?

Allure itself doesn’t have built-in email functionality, but it’s straightforward to set this up with extra tools:

  • Emailing reports: After generating your Allure HTML report, use a Node.js package like nodemailer to send the zipped allure-report folder as an attachment, or include a link to a hosted version of the report. You can add this step to your test scripts (e.g., in package.json) so it runs automatically after test execution.
  • Sharing internally: To make reports accessible to your team, host the allure-report folder on an internal web server. For quick setups, use tools like http-server (install via npm) to spin up a static file server, then share the URL with your team. If you’re using CI/CD pipelines (like Jenkins, GitHub Actions, or GitLab CI), configure them to deploy the allure-report folder to an internal static hosting service, or use the pipeline’s built-in Allure integration to host reports directly within the platform.

Let’s break this down clearly:

  • Folder roles:
    • allure-results: This is where raw test result files (JSON, XML, etc.) are stored after your tests run. Allure uses these files to generate the HTML report.
    • allure-reports: This is the output folder for the generated HTML report—it’s just a static website, and Allure never uses this folder to build future reports.
  • Historical trend issue: The trend chart depends on accumulated test results from previous runs. If you’re overwriting the allure-results folder every time you run tests, you lose the historical data needed to generate the trend.
  • Fixing the trend: To preserve history, keep old result files in allure-results alongside new ones:
    • Before running new tests, copy existing allure-results files to a backup location, then merge the backup with new results after tests finish.
    • In CI/CD environments, use a persistent storage volume (like Jenkins workspace retention or GitHub Actions artifacts) to keep the allure-results folder across test runs. When generating the report, Allure will automatically use all results in the folder to build the trend.

内容的提问来源于stack exchange,提问作者Siddharth Sonone

火山引擎 最新活动