【问题标题】:My robot frame work suite setup __init__.robot does not run我的机器人框架套件设置 __init__.robot 没有运行
【发布时间】:2017-05-12 16:30:50
【问题描述】:

我有这个设置

__init__.robot:

*** Settings *** Suite Setup    Init
*** Keywords ***
Init
    Log  Initialization   console= true`

测试机器人:

*** Test Cases ***
Case1
Log  test case 1   console=true 

suite.txt:

test.robot

当我跑步时 pybot --argumentfile 套件.txt

我的 __init__.robot 没有运行。 如何让它运行?

【问题讨论】:

    标签: robotframework


    【解决方案1】:

    在使用 __init__.robot 执行文件夹内的一个文件时,机器人不会执行 __init__.robot。

    考虑到您的文件位于 /TestSuite/ 下,运行以下命令以查看更改:

    pybot /TestSuite  (this will execute everything inside TestSuite with __init__ )
    
    pybot -s test -t Case1 /TestSuite (this will execute suite test.robot and only selected test Case1 from folder TestSuite together with __init__ )
    
    pybot -t Case1 /TestSuite/test.robot (this will execute only Case1 from test.robot without __init__ )
    

    用于救援的 RobotFramework 文档: http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#execution-flow

    【讨论】:

      猜你喜欢
      • 2016-02-20
      • 2014-05-16
      • 2020-08-06
      • 2020-06-14
      • 1970-01-01
      • 2021-08-01
      • 2018-04-25
      • 2017-08-15
      • 2017-12-25
      相关资源
      最近更新 更多