1

I use behave to run a set of e2e tests for my software, eg:

behave ./tests/ --tags=set123 --tags=-skip

When the process ends, a tests/results/ directory is created, plenty of results in the form of .xml files which root element is <testsuite>.

I'd like to have an static HTML report with the result. PyCharm have a nice button to get such report directly, but I wonder about how to get it from the command line. I mean, some way of processing the resulting .xml files to render the HTML or (even better) to do it as result of the behave command itself.

Any help, please? This seems to be conceptually easy but I haven't found any straighfoward solution googling out there...

EDIT: I know the Allure tool. However, it doesn't fit my purpose as it starts a web server to serve the report and I need an static HTML. I have adjusted the wording of the question to make it clearer.

fgalan
  • 11,732
  • 9
  • 46
  • 89
  • 1
    check out this comment: https://stackoverflow.com/a/45012628/650884 – Pavel Nov 28 '17 at 19:11
  • Thanks for the hint @Pavel! I'm trying to follow it, but it seems that the allure APT installation described at https://docs.qameta.io/allure/latest/ is for Ubuntu... trying to hack to make it work with Debian fail in packages dependencies. Keep trying... – fgalan Nov 28 '17 at 21:04
  • I finally managed to run allure. However, the problem is that this tools starts a web server to server the pages. I need an static HTML solution. Thanks anyway! – fgalan Jan 30 '18 at 12:59
  • @fgalan - did you find any solution? I am facing the same issue as you nowadays. – Helping Hands Dec 31 '19 at 10:19
  • @Helping Hands, I'm afraid I didn't so far :( – fgalan Jan 06 '20 at 18:39
  • @fgalan - No problem. – Helping Hands Jan 07 '20 at 04:51

1 Answers1

1

Well if you don t have a lot of tests you can think on change framework to pytest + pytest_bdd and then you can generate html static reports with pytest-html. Or even , i don t know if possible , call pytest report from behave

Boikot
  • 304
  • 2
  • 9