仅当RobotFramework中的第一个测试失败时才开始第二个测试

仅当RobotFramework中的第一个测试失败时才开始第二个测试,robotframework,Robotframework,我在RobotFramework中定义了两个测试用例 测试1 测试2 只有当test1失败时才可以启动test2吗?实现这一点的一种方法是使用 从这个图书馆摘录 声明测试之间的依赖关系。使测试自动失败 基于其他测试用例或测试套件的结果 在下面的示例中,您可以使用Depends-depen-test关键字,如图所示 *** Settings *** Library DependencyLibrary *** Test cases *** Passing Test No operatio

我在RobotFramework中定义了两个测试用例

测试1 测试2


只有当test1失败时才可以启动test2吗?

实现这一点的一种方法是使用

从这个图书馆摘录

声明测试之间的依赖关系。使测试自动失败 基于其他测试用例或测试套件的结果

在下面的示例中,您可以使用Depends-depen-test关键字,如图所示

*** Settings ***
Library  DependencyLibrary

*** Test cases ***
Passing Test
    No operation

Failing Test
    Fail  This test is intentionally hardcoded to fail

This Test Depends on "Passing Test" Passing
    Depends on test  Passing Test
    Log  The rest of the keywords in this test will run as normal.

This Test Depends on "Failing Test" Failing
    Depends on test failure  Failing Test
    Log  The rest of the keywords in this test will run as normal.