51Testing软件测试论坛

标题: loadrunner 录制上传本地文档时,生成lrw_cusom_body.h文件出现乱码 [打印本页]

作者: yulianling    时间: 2011-8-22 11:05
标题: loadrunner 录制上传本地文档时,生成lrw_cusom_body.h文件出现乱码
请各位大侠帮帮忙,到底怎么回事啊,我尝试了用html和url协议上传文档,可是都是一样的结果,生成的lrw_cusom_body.h文件出现乱码
const char * const body_variable_1 = "BodyBinary=------------cH2cH2KM7ae0GI3Ef1ei4cH2GI3GI3\r\n"
                "Content-Disposition: form-data; name=\"Filename\"\r\n"
                "\r\n"
                "xuq.docx\r\n"
                "------------cH2cH2KM7ae0GI3Ef1ei4cH2GI3GI3\r\n"
                "Content-Disposition: form-data; name=\"projectID\"\r\n"
                "\r\n"
                "55\r\n"
                "------------cH2cH2KM7ae0GI3Ef1ei4cH2GI3GI3\r\n"
                "Content-Disposition: form-data; name=\"test\"\r\n"
                "\r\n"
                "Hello World\r\n"
                "------------cH2cH2KM7ae0GI3Ef1ei4cH2GI3GI3\r\n"
                "Content-Disposition: form-data; name=\"Filedata\"; \\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00
作者: msnshow    时间: 2011-8-22 13:40
这个不是乱码,上传文件的脚本最好自己手工写,录制就是这样的
作者: yulianling    时间: 2011-8-23 11:00
自己手工写上传文件的过程吗?能否给个代码参考下,偶还是个新手
作者: msnshow    时间: 2011-8-23 21:57
是的,查看我的博客,里面有这样一段代码
作者: yulianling    时间: 2011-8-24 11:18
回复 4# msnshow


   谢谢




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2