Python 无法基于Robot Framework中的标记运行测试套件安装程序

Python 无法基于Robot Framework中的标记运行测试套件安装程序,python,robotframework,Python,Robotframework,我有一个测试套件,它有5个测试,组合了不同的测试标签,如下所示 *** Settings *** Test Setup Perform Test Setup *** Test Cases *** TC1 [Tags] preprod log to console preprod tests : test1 TC2 [Tags] Debug log to console debug tests : test2 TC3 [Ta

我有一个测试套件,它有5个测试,组合了不同的测试标签,如下所示

*** Settings ***
Test Setup           Perform Test Setup

*** Test Cases ***
TC1
    [Tags]  preprod
    log to console  preprod tests : test1

TC2
    [Tags]  Debug
    log to console  debug tests : test2

TC3
    [Tags]  preprod  Debug
    log to console  debug and prerod : test3

*** Keywords ***
Perform Test Setup
    log to console  Test Cases With Tag To Run Are : @{TEST TAGS}
    Run Keyword If  'Debug' in ${TEST TAGS}
    ...  log to console  Debug Test Starting

    Run Keyword If  'preprod' in ${TEST TAGS}
    ...    log to console  preprod tests starting
现在,当我用tag运行下面的命令时

robot -i preprod sample.robot

甚至条件hpt的执行测试设置中的关键字也在运行

=============================================================================
Sample                                                                        
==============================================================================
TC1                                                                   Test Cases With Tag To Run Are : ['preprod']
preprod tests starting
.preprod tests : test1
TC1                                                                   | PASS |
------------------------------------------------------------------------------
TC3                                                                   Test Cases With Tag To Run Are : ['Debug', 'preprod']
Debug Test Starting
preprod tests starting
.debug and prerod : test3
TC3                                                                   | PASS |
------------------------------------------------------------------------------
Sample                                                                | PASS |
2 critical tests, 2 passed, 0 failed
2 tests total, 2 passed, 0 failed
==============================================================================

在执行测试设置条件中给出
'Debug'=${TEST TAGS}
时,关键字根本不执行


如何基于测试中带有多个标记和组合的标记运行测试套件设置或拆卸

“即使来自hpt条件下执行测试设置的关键字正在运行。”-这是什么意思?什么是“hpt”?不清楚你在问什么。您可以将任何需要的逻辑放入
执行测试设置
。在
执行测试设置
中应该发生什么的规则是什么?