Add custom info to JBehave HTML report

2019-06-26 11:03发布

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条回答
甜甜的少女心
2楼-- · 2019-06-26 11:31

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.

查看更多
登录 后发表回答