*** Variables ***
${BROWSER} firefox
${URL} http://url/
${Delay} 0
在我settings.txt文件传递不同的浏览器我有一个名为{}浏览器和准值,如图上面的变量是火狐我们怎样才能在一次robotframework
,但我想要的是
*** Variables ***
@{BROWSERS} firefox chrome IE
${URL} http://url/
${Delay} 0
像上面这样的东西...所以当我运行测试套件时,它会运行在Firefox和所有测试用例完成后它将关闭Firefox,并将打开Chrome并在Chrome浏览器上再次运行所有测试用例。等此后它将运行在IE
那么我们该怎么做呢?
我不想手动做(我的意思是通过一个一个传递或编辑txt文件)。 全自动....一旦我运行测试,它会自动在所有浏览器中测试。
PS:这是在settings.txt文件中,我有两个文件夹,其中我有test.txt文件。所以..我不得不遍历这些文件夹在一个循环
|-- main.py
|-- settings.txt //in this file i have browser variable (or Array)
|-- test1
| |-- testl.txt
| |-- test1_settings.txt //this will contain all the variables and user defined keyword related to test1 and
|-- test2
| |-- test2.txt
| |-- test2_settings.txt //same as test1
我运行测试用例这样 $pybot test1 test2
解决方案2应该工作,不是吗?这就是我做这种事情的方式,我对此感到满意。我开始与詹金斯进行测试,并且我想测试每个配置1个作业。 –