Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/221.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Robotframework 在案例中,参考detault套件拆卸';s习惯[拆卸]_Robotframework - Fatal编程技术网

Robotframework 在案例中,参考detault套件拆卸';s习惯[拆卸]

Robotframework 在案例中,参考detault套件拆卸';s习惯[拆卸],robotframework,Robotframework,当您在特定测试用例中重写它时,是否可能调用套件中定义的默认拆卸(如果是,如何调用) 例如: *** Settings *** Suite Setup Setup The Environment Test Teardown Clean The System *** Test Cases *** Test the thing Do something Create an object [Teardown] Delete the obje

当您在特定测试用例中重写它时,是否可能调用套件中定义的默认拆卸(如果是,如何调用)

例如:

*** Settings ***
Suite Setup         Setup The Environment
Test Teardown       Clean The System

*** Test Cases ***
Test the thing
    Do something
    Create an object

    [Teardown]     Delete the object             # at this point the suite's test case teardown is overriden, "Clean The System" will not be called
问题是是否有一个对套件级测试拆卸的内部引用,或者是否有一个在测试用例中的任何自定义拆卸之后强制执行它的设置——除了明显的

Run Keywords    Delete the object    AND   Clean The System

后者将责任转移到创建测试用例的人身上,并且很容易被忽略——特别是在一个大的套件/长的关键字列表中。

我认为没有任何方法可以实现您想要的。您显而易见的解决方案是唯一的解决方案。

我也很遗憾在文档中没有找到任何内容(以及快速浏览源代码),因此询问这里似乎是个问题。您想做什么?@Alex.S-在设置级别强制使用拆卸集,在覆盖它的每个测试用例中都显式调用它。