简体   繁体   English

范围报告监控

[英]Extent Report Monitoring

Just a question to anyone here who is using ExtentReport as a listener. 这是对使用ExtentReport作为侦听器的任何人的一个问题。

Is it possible to use ExtentReport to generate the HTML Report during the tests being executed when its being used as a listener? 将ExtentReport用作侦听器时,是否可以在执行测试的过程中使用它生成HTML报告?

For example, instead of the report being generated when the tests are finished, the report is generated after the first test, and so on? 例如,不是在测试完成时生成报告,而是在第一次测试后生成报告,依此类推? I want to use ExtentReport to monitor the progress of my tests aswell and showing the results? 我想使用ExtentReport来监视测试进度并显示结果吗?

I've learnt its possible when using as a logger, as you can do a flush after each tests. 我已经知道它可以用作记录器,因为您可以在每次测试后进行刷新。 However is it possible while using Extent as a Listener? 但是,将范围用作侦听器时是否可能?

Thanks in advanced. 提前致谢。

Kind regards, Colin. 亲切的问候,科林。

Yes it is possible. 对的,这是可能的。 Since extent report is open source. 由于范围报告是开源的。 One could edit the function which formulate the structure of our final report. 可以编辑制定最终报告结构的功能。 But since extent report uses different functionalities, just modifying an endtest would cause a cascading effect on everything. 但是由于范围报告使用不同的功能,因此仅修改最终测试将对所有内容产生级联效应。 Or another way is to save the data before flush is called and by calling flussh everytime. 或者另一种方法是在调用flush之前并每次都调用flussh来保存数据。 One could replace the existing file over and over. 可以一遍又一遍地替换现有文件。 My best bet is too leave it as it is and get other listener jars to do the work for you. 我最好的选择是保持原样,并让其他监听器罐为您完成工作。

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

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