如何使用Behave Python生成Junit输出报告

jul*_*n88 6 python testing junit

我在Python上使用Behave来测试Web应用程序.我的测试套件运行正常,但我无法生成junit报告.

这是我的behave.ini文件:

    [behave]
junit=true
format=pretty
Run Code Online (Sandbox Code Playgroud)

我只运行使用此命令:behave

运行后,测试结果将在控制台中打印,但不会生成任何报告.

1 feature passed, 3 failed, 0 skipped
60 scenarios passed, 5 failed, 0 skipped
395 steps passed, 5 failed, 5 skipped, 0 undefined
Took 10m17.149s
Run Code Online (Sandbox Code Playgroud)

我能做什么 ?

小智 -2

我做了一些搜索,看来最简单的方法是通过 Jenkins junit 插件。

在我看来,应该有一种简单的方法将 junit xml 报告转换为人类可读的 html 格式,但我在任何搜索中都没有找到它。我能想到的最好的办法是一些 junit bash 脚本,但它们似乎没有任何发布功能。他们只生成 xml 报告。