关于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
nodemailerto send the zippedallure-reportfolder 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., inpackage.json) so it runs automatically after test execution. - Sharing internally: To make reports accessible to your team, host the
allure-reportfolder on an internal web server. For quick setups, use tools likehttp-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 theallure-reportfolder to an internal static hosting service, or use the pipeline’s built-in Allure integration to host reports directly within the platform.
2. Why isn’t my Allure report showing historical trends, and how do the allure-results and allure-reports folders interact?
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-resultsfolder 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-resultsalongside new ones:- Before running new tests, copy existing
allure-resultsfiles 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-resultsfolder across test runs. When generating the report, Allure will automatically use all results in the folder to build the trend.
- Before running new tests, copy existing
内容的提问来源于stack exchange,提问作者Siddharth Sonone




