【发布时间】:2018-02-08 15:10:00
【问题描述】:
我有以下情况。 Test.robot 是我的机器人套件,有 4 个测试用例。
***Settings**
Resource Python Resource files
Suite Setup ${xyz}
Suite Teardown ${xyz}
Test Setup ${Xyz}
***Variables***
/*This is pointing to the folder with my data files*/
${data} {CURDIR}/
*** Test Cases ***
Test_case1
Test_case2
Test_case3
Test_case4
我有一个包含文件夹的目录 1.Test_Case1 2.Test_Case2 3.Test_Case3 4.Test_Case4 test.robot(我的机器人套件)
以上 4 个文件夹包含我的测试(test_case1、test_case2、test_case3、test_case4)在运行时将访问的数据文件。我不确定如何设置变量,以便在运行 test.robot 套件时动态访问特定的测试文件夹。
我的意思是,当我运行 test.robot 时,所有四个测试(test_case1、test_case2 等)都会运行。我不确定如何设置变量 ${data} 以便在特定测试用例运行时动态访问正确的 test_case 文件夹
【问题讨论】: