简体   繁体   English

魅力报告不断增长,并且随着时间的推移花费的时间更长

[英]Allure report growing and taking longer to generate over time

When I first installed Allure on our Jenkins pipeline, it was a short increase to the total build time and created excellent reports. 当我在Jenkins管道上首次安装Allure时,这只是总构建时间的短暂增加,并且创建了出色的报告。 The reports are still excellent, but with each build, the report grows by ~1MB and takes longer and longer to generate. 该报告仍然非常出色,但是对于每个构建,该报告都会增长〜1MB,并且生成时间越来越长。 At this point each report is 70MB takes 20+ mins (longer than the rest of the pipeline). 至此,每个报告的70MB占用了20分钟以上的时间(比其他管道要长)。

My guess is that Allure is using all of the combined test results since it was implemented into the pipeline for each new, generating larger reports and taking longer. 我的猜测是,Allure正在使用所有合并的测试结果,因为它已针对每个新产品实施到管道中,从而生成更大的报告并花费更长的时间。 What are my options to limit the size of the report while keeping it useful and how do I make those changes? 在限制报告的大小并保持有用的情况下,我有哪些选择?如何进行这些更改?

I believe you are using webdriverio with javascripts and nodejs. 我相信您正在将webdriverio与javascript和nodejs一起使用。

Try clearing your report folder before script execution starts. 尝试在脚本执行开始之前清除报告文件夹。 You can use del module for this purpose 您可以为此目的使用del模块

It will look like this: 它看起来像这样:

const del = require('del');
del(['tmp/*.js', '!tmp/unicorn.js']).then(paths => {
console.log('Deleted files and folders:\n', paths.join('\n'));
});



Hope it helps!!

You just need to make sure that you are clearing / deleting allure-results directory in between test executions 您只需要确保在测试执行之间清除/删除allure-results目录

And you'll still have trends / history build - Allure Jenkins plugin builds it using previous generated report artefacts 而且您仍将拥有趋势/历史记录构建-Allure Jenkins插件使用先前生成的报告工件来构建它

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM