生成报告并将其与 jenkins 集成 [英] Generate report and integrate it with jenkins

查看:19
本文介绍了生成报告并将其与 jenkins 集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是空手道新手,但几乎了解所有基础知识.我想为我的测试用例生成一份报告,该报告将保存在文件夹中以供历史记录.目前,我正在使用每次运行测试用例时覆盖或更新的 HTML 报告.

I am new in Karate but know almost all the basics. I want to generate a report for my test cases which will be kept in the folder for history purposes. currently, I am using the HTML report which overrides or updates every time I run my test cases.

如果您可以向我推荐一个分步教程或链接,或者只是给我一个有关如何处理此问题的提示.

If you can recommend me a step-by-step tutorial or a link, or simply give me a hint on how to approach this.

我曾尝试使用 allure 框架,但我正在努力设置它.认为这将是解决我的问题的最佳方法.

I have tried to use the allure framework and I am struggling to set it up. Thought it would be the best approach to solve my problem.

附件是我正在谈论的 HTML 报告.提前致谢

Attached is my HTML report I am talking about. Thanks in advance

推荐答案

您所说的JUnit HTML报告是为方便开发而设计的,因此在进行测试时,您需要重新运行并重新刷新浏览器.

The JUnit HTML report which you have referred to as an image is designed for easy development, so when working on a test, you re-run and re-fresh the browser.

我们建议使用并行跑步者报告.大多数时候,第 3 方框架会为您解决这个问题——尤其是如果您将它们与 CI 集成使用.参见这个例子.

What we recommend is to use the parallel runner reports. Most of the time, 3rd party frameworks will solve this problem for you - especially if you use them integrated with CI. See this for example.

但最后,Karate 将输出行业标准的 Cucumber JSON 报告格式,因此您始终可以自己编写报告解决方案.请注意,其他人已经成功集成 Allure - 所以请参考这个答案:https://stackoverflow.com/a/54527955/143475

But finally, Karate will output the industry-standard Cucumber JSON report format, so you can always write a reporting solution yourself. Note that others have had success integrating Allure - so please refer this answer: https://stackoverflow.com/a/54527955/143475

这篇关于生成报告并将其与 jenkins 集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆