机器人框架中的拆卸动作

2024-06-24 12:05:11 发布

您现在位置:Python中文网/ 问答频道 /正文

我在robot框架中有3个测试用例,在执行3个测试用例之后,我只需要最后运行一次拆卸操作。 如何处理?

*** Settings ***
Test Teardown     Teardown Actions
Library           abc.py

*** Variables ***

*** Test Cases ***
testcase1
    Run Keyword    func1

testcase2
    Run Keyword    func2

testcase3
    Run Keyword    func3


*** Keywords ***
Teardown Actions
    Run Keyword    clear

Tags: runpytest框架actionssettingslibraryrobot