Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.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
在for循环中使用yaml列表的Robot框架_Yaml_Robotframework - Fatal编程技术网

在for循环中使用yaml列表的Robot框架

在for循环中使用yaml列表的Robot框架,yaml,robotframework,Yaml,Robotframework,我对for循环有问题 获取错误“FOR循环不包含关键字” 我导入了一个yaml文件 test_sequence_1: - test_name: "Test" test_items: - test_name1 - test_name2 然后我导入它并尝试对其进行迭代 *** Settings *** Library BuiltIn Library Collections Variables ../vars/vrf_test_case

我对for循环有问题

获取错误“FOR循环不包含关键字”

我导入了一个yaml文件

test_sequence_1:
  - test_name: "Test"
    test_items:
      - test_name1
      - test_name2
然后我导入它并尝试对其进行迭代

*** Settings ***
Library  BuiltIn
Library  Collections

Variables  ../vars/vrf_test_cases.yaml
*** Test Cases ***
Run Sequential Tests
    Launch test cases sequence  @{test_sequence_1}
然后运行关键字,我尝试了不同的for循环,以及其他各种选项。我一辈子都不能让第二个循环工作

Launch test cases sequence
    #TODO add a default empty value for extra_vars_dict
    [Documentation]         Launch a given set of workflow templates from a yaml dictionary
    [Arguments]             @{test_sequence_dict}
    FOR  ${sequence}  IN  @{test_sequence_dict}
        Log to Console  \n\n\n Launching: ${sequence['test_name']}
        @{test_list}=    Convert To List    ${sequence['test_items']}
        Log to Console  \n Run Tests var: @{test_list}[0]
        #FOR  ${test}  IN  @{sequence['test_items']}
            #Log to Console  ${test}
            #Run Keyword  ${test}
        #END
        FOR  ${test}  IN  @{test_list}
            Log to Console  ${test}
        END        
    END

我觉得我遗漏了什么,不知道遗漏的部分是什么。

robot框架不支持嵌套for循环

从《用户指南》中标题为

不直接支持嵌套for循环,但可以在for循环中使用用户关键字,并在其中使用另一个for循环


谢谢,我不知道,甚至不认为问题是嵌套循环。