[英]How to run robot framework test cases parallel and not Test Suite parallel?
I'm trying to run my test case from different suites in parallel using the command我正在尝试使用以下命令从不同套件并行运行我的测试用例
pabot --verbose --processes 3 --variable --variable url:http://xxxxxxxxx:8080 --include Sanity --output original.xml --randomize all TestCases
There are two findings while execution:执行时有两个发现:
pabot_results\\TestCases
that makes my rerunning of failed test cases difficult.它为每个测试套件pabot_results\\TestCases
分别创建pabot_results\\TestCases
,这使我重新运行失败的测试用例变得困难。 How to get a single output.xml file all the suite execution ?如何获取单个 output.xml 文件的所有套件执行?I use the below library我使用下面的库
robotframework-pabot==0.53 robotsframework-pabot==0.53
robotframework-seleniumlibrary==3.3.1 robotsframework-seleniumlibrary==3.3.1
First point: If you read the GitHub readme page , in the "Things you should know", it states:第一点:如果您阅读GitHub 自述页面,在“您应该知道的事情”中,它指出:
Pabot will split test execution from suite files and not from individual test level. Pabot 将从套件文件而不是从单个测试级别拆分测试执行。
So there is nothing to do on test level, except if you help develop the tool so it becomes possible to launch testcases in parallel.所以在测试级别没有什么可做的,除非你帮助开发工具,这样就可以并行启动测试用例。
Second point: Use rebot .第二点:使用rebot 。 You can merge multiple test execution reports by using the command:您可以使用以下命令合并多个测试执行报告:
rebot --merge output1.xml output2.xml
This will generate only html report.这将仅生成 html 报告。 To obtain a merged output.xml file, just add an -o output.xml
in the arguments, like this:要获得合并的 output.xml 文件,只需在参数中添加-o output.xml
,如下所示:
rebot -o output.xml --merge output1.xml output2.xml
Now (after version 0.57) you can do this with现在(0.57 版之后)你可以用
pabot --testlevelsplit [path to tests]
official link for more info https://github.com/mkorpela/pabot更多信息的官方链接https://github.com/mkorpela/pabot
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.