编写下载文件脚本遇到的问题,求解惑,十分感谢

来源:4-18 Vugen脚本调试

qq_reticence_0

2021-07-22

需求:
1、测试单用户连续下载同一个文件5分钟的平均响应时间。
2、测试多用户并发下载同一个文件5分钟的平均响应时间。
脚本录制逻辑:
初始化:登录
action:点击文档下载->输入文件名00003进行文档查询->在返回的文件中点击->选择保存的路径
end:退出登录
3、问题:同样的录制方法,经过脚本增强后发现始终找不到边界。回放时错误日志如下:
A.脚本工程名:xiazaifile
Action2.c(74): Error -35061: No match found for the requested parameter “fileconten”. Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 20000 bytes, use web_set_max_html_param_len to increase the parameter size [MsgId: MERR-35061]
Action2.c(74): web_url(“upload_3”) highest severity level was “ERROR”, 25 body bytes, 245 header bytes, 11 chunking overhead bytes [MsgId: MMSG-26387]
B.脚本工程名:xiazai
Action.c(69): Error -26377: No match found for the requested parameter “fcontent”. Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 20000000 bytes, use web_set_max_html_param_len to increase the parameter size [MsgId: MERR-26377]
Action.c(69): Notify: Saving Parameter "fcontent = ".
Action.c(69): Error -26374: The above “not found” error(s) may be explained by header and body byte counts being 0 and 0, respectively. [MsgId: MERR-26374]

C.脚本工程名:downloadfile
百度上的解决办法确认都没法解决。无奈又重新录制了一遍。回放日志如下:
Action.c(14): Notify: Parameter Substitution: parameter “RandomNum” = “0058438"
C:\Users\testwin7\Documents\excel\0058438.txt
Action.c(24): web_set_max_html_param_len was successful [MsgId: MMSG-26392]
Action.c(26): Registering web_reg_save_param was successful [MsgId: MMSG-26390]
Action.c(32): Notify: Transaction “下载帮助文件” started.
Action.c(34): Notify: Saving Parameter “fcontent = \r13417\r\n\r\n\r\n3Dcolumn-1%26p_p_col_count%3D1%26_15_struts_action%3D%252Fjournal%252Fview%26_15_tabs1%3Darticles&_15_groupId=10780&_15_articleId=13501&_15_version=1.0”>13501\r\n\r\n\r\n”.
Action.c(34): web_url(“upload_3”) was successful, 677 body bytes, 245 header bytes, 12 chunking overhead bytes [MsgId: MMSG-26385]
Action.c(42): web_get_int_property was successful [MsgId: MMSG-26392]
Action.c(56): Notify: Parameter Substitution: parameter “fcontent” = “\r13417\r\n\r\n\r\n3Dcolumn-1%26p_p_col_count%3D1%26_15_struts_action%3D%252Fjournal%252Fview%26_15_tabs1%3Darticles&_15_groupId=10780&_15_articleId=13501&_15_version=1.0”>13501\r\n\r\n\r\n"
Action.c(61): Notify: Transaction “下载帮助文件” ended with “Pass” status (Duration: 0.0917 Wasted Time: 0.0010).
问题:虽然事务是成功了,但是本地文件没有找到对应的文件。
性能测试路漫漫,附上以上3个工程文件+测试环境包,附上百度网盘链接,希望老师帮忙解惑,感谢。
链接:https://pan.baidu.com/s/1ul6g5PASywyy-0d14olA7Q
提取码:uzes

写回答

1回答

风落几番

2021-07-30

看你第二个的关联参数结果,获得的结果带有很多符号之类的,这会让你在后续操作无法实现,需要格式化成你想要的。

最初写时候,你可以尝试先写死,慢慢把参数替换进去,多打日志,可以更加自由一点,不要依赖录制,录制的脚本其实大概率非常废柴,尝试多去抓包自己写~

0
0

LoadRunner性能测试实战训练营 全流程掌握性能测试

从基础到项目实战,一站式掌握性能测试全流程

863 学习 · 265 问题

查看课程