简体   繁体   English

Python 生菜测试结果 XML

[英]Python lettuce test results in XML

I'm trying to get an xml report of the results of my behavior tests running in the lettuce framework.我正在尝试获取在生菜框架中运行的行为测试结果的 xml 报告。 According the --help for lettuce, you should use the switch --with-xunit.根据生菜的--help,您应该使用开关--with-xunit。 I've done that (and also used --xunit-file) but no report is generated.我已经这样做了(并且还使用了 --xunit-file),但没有生成报告。 I tried reinstalling lettuce but still no luck.我尝试重新安装生菜,但仍然没有运气。 How can I get it to generate this report?我怎样才能得到它来生成这个报告?

I know this is really late, but I made a boilerplate project for lettuce and python (and jenkins).我知道这真的很晚了,但我为生菜和 python(和詹金斯)做了一个样板项目。

This is how I solved it: have coverage talk to lettuce这就是我解决它的方法: 与生菜交谈

If you like an example, you are welcome to poke around here: https://github.com/stephas/jenkins-lettuce如果喜欢例子,欢迎戳这里: https://github.com/stephas/jenkins-lettuce

This was actually something simple: the folder the tests were running in were owned by root so I needed to run the tests with sudo in order for it to generate the report.这实际上很简单:运行测试的文件夹归 root 所有,所以我需要使用 sudo 运行测试才能生成报告。

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

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