testing - 如何按特定顺序在 robotframework 中执行 TEST SUITES?

标签 testing jenkins automation automated-tests robotframework

我使用 Robotframework 在以下结构中设置了我的测试:

Directory1: 
  - SuiteA
  - SuiteB
  - SuiteC

Directory2: 
  - SuiteA
  - SuiteB

我想先执行 Directory1 中的所有测试套件,然后再使用“pabot”执行 Directory2 中的套件。 Directory2 中的测试套件依赖于 Directory1 中的测试套件,因此必须按此顺序执行。我怎样才能以这种方式命令执行?

我在网上阅读有关使用参数文件指定执行顺序的信息,但我无法理解。我还阅读了 Robotframework 的文档,并使用“number__testsuitename”命名约定相应地命名了我的测试套件,但这也不起作用。

有什么想法吗?提前致谢!

最佳答案

基本上,您需要使用要并行运行的测试/套件修改 .pabotsuitenames 文件,并添加 #WAIT 标志以防您需要按顺序运行某些东西,例如:

datasources:7a60d412cbd2efd728502cddce7ce4cd4b57aa42
commandlineoptions:65f95c924ba97541f47949701c4e3c51192a5b43
suitesfrom:no-suites-from-option
file:984cbf6a94ce4d05453079d2eedf2399a3cae664
--suite Directory 1 Name.Suite A Name 
--suite Directory 1 Name.Suite B Name
--suite Directory 1 Name.Suite C Name
#WAIT
--suite Directory 2 Name.Suite A Name 
--suite Directory 2 Name.Suite B Name

pabot 确实提供了控制并行级别和执行顺序的选项。它在项目的自述文件中描述:

.pabotsuitenames file contains the list of suites that will be executed. File is created during pabot execution if not already there. The file is a cache that pabot uses when re-executing same tests to speed up processing. This file can be partially manually edited. First 4 rows contain information that should not be edited - pabot will edit these when something changes. After this come the suite names.

There are three possibilities to influence the execution:

The order of suites can be changed. If a directory (or a directory structure) should be executed sequentially, add the directory suite name to a row. You can add a line with text #WAIT to force executor to wait until all previous suites have been executed.

Pabot Github

关于testing - 如何按特定顺序在 robotframework 中执行 TEST SUITES?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48759206/

相关文章:

performance - NoSQL 数据库性能测试

templates - AngularJS + Karma + Ng-html2js => 无法实例化模块 ...html

docker - 如何使jenkins管道在远程服务器上运行docker命令

.net - 是否有适用于 Siemens Logo 的 http-API

ios - 在哪里可以获取适用于我的 iOS 项目的 Appium 兼容 iOS 应用程序文件?

c# - 为什么VS2012以不同的速度运行相同的测试?

php - 使用海报扩展测试 php 功能

shell - Powershell脚本在Jenkins中没有失败

jenkins - 如何保留对 Jenkins 的输入?

java - 无法单击位于不同框架中的单选按钮