Add custom info to JBehave HTML report

那年仲夏 提交于 2019-12-23 13:19:16

问题


When generating reports, JBehave automatically puts the story contents into the report, along with possible assertion failures. So far, so good. However, I would like to add some more information, especially (but not necessarily limited to) failing steps.

In the concrete case at hand, the test generates random file names to guarantee uniqueness while running the scenario. I would like these names, that are generated in my @Given or @When annotated methods, to be included in the report.

I find the documentation a bit lacking/confusing. Am I missing something obvious?


回答1:


See:

Additional logging JBehave

In your case, you would have to store the generated filenames as attributes of the test driver, and print them out at the end.



来源:https://stackoverflow.com/questions/9000090/add-custom-info-to-jbehave-html-report

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!