将返回值附加到Robot Framework中的列表

时间:2017-11-27 22:24:27

标签: robotframework

我的测试步骤创建了5个工作线程,用于将文件上传到服务器,并返回每个线程的服务器HTTP响应代码。 我想将这些附加到每个步骤的响应代码列表中。

TC001_Single_User_Upload
   [Documentation] Uploading single file by single user
   ${result}       single user test file upload    test_file.txt    test1   test
   Append To List  @{RESPONSE_LIST}    ${result}
   ${result}       single user test file upload    test_file.txt    test1   test
   Append To List  @{RESPONSE_LIST}    ${result}
   log variables
   log many     @{RESPONSE_LIST}

我当前的日志文件显示了这个:

20171127 13:59:01.911 - INFO - @{RESPONSE_LIST} = [ ]
20171127 13:59:01.911 - INFO - @{result} = [ <Response [201]> | <Response [201]> | <Response [201]> | <Response [201]> | <Response [201]> ]

问:为什么我的@ {RESPONSE_LIST}为空?

0 个答案:

没有答案