51Testing软件测试论坛
标题:
loadrunner如何将文件转换成base64 字节
[打印本页]
作者:
archonwang
时间:
2016-3-24 09:52
标题:
loadrunner如何将文件转换成base64 字节
项目上遇到一个问题,由于文件在上传时采用了流传输模式,上传的是文件经base64转换后的编码。所以想了解下如何实现。
具体要求如下:
将d:\abc.txt文件转换成base64 string post到服务端。
post脚本样本
web_custom_request("UploadFile",
"URL=http://192.168.17.112/api/File/UploadFile",
"Method=POST",
"Resource=0",
"RecContentType=application/json",
"Referer=",
"Snapshot=t4.inf",
"Mode=HTML",
"EncType=application/json",
"Body={\r\n \"Passport\": \"QfrU2SFIdJ5Y6k9LPRXFGymU2EdN0B/0l6xRIWC0/3vb4imBnwdw12e8BwS0jxwl0Gi+36cXi+0LinHl8a4nOnyQlnzwlEEv4/KzLkTeE6Xv8juLNvNZ4H0yPofTNugHNfJVkEZwxS+7SzNNdn4wGLgrv1eieqUSKpojNEV/cxw=\",\r\n \"FileName\": \"testdocx-CH.docx\",\r\n \"Data\": \"UEsDBBQABgAIAAAAIQAY+"
"WgijQEAAK0GAAATAAgCW0NvbnRlbnRfVHlwZXNdLnhtbCCiBAIooAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKzUzU6DQBAH8LuJ70D2LgtVqzFdejEmvSo+"
"VuZG5vdGVzLnhtbFBLAQItABQABgAIAAAAIQB0LMNfnwYAAFEbAAAVAAAAAAAAAAAAAAAAAFsTAAB3b3JkL3RoZW1lL3RoZW1lMS54bWxQSwECLQAUAAYACAAAACEASJ9VGlMFAADlDQAAEQAAAAAAAAAAAAAAAAAtGgAAd29yZC9zZXR0aW5ncy54bWxQSwECLQAUAAYACAAAACEAsROr1hQCAAAgIQAAFAAAAAAAAAAAAAAAAACvHwAAd29yZC93ZWJTZXR0aW5ncy54bWxQSwECLQAUAAYACAAAACEAl4bNtbkIAABqMgAADwAAAAAAAAAAAAAAAAD1IQAAd29yZC9zdHlsZXMueG1sUEsBAi0AFAAGAAgAAAAhADdDkPeqAgAArQ4AABIAAAAAAAAAAAAAAAAA2yoAAHdvcmQvbnVtYmVyaW5nLnhtbFBLAQItABQABgAIAAAAIQDuSW5zfAEAAKsCAAARAAAAAAAAAAAAAAAAALUt"
"AABkb2NQcm9wcy9jb3JlLnhtbFBLAQItABQABgAIAAAAIQCc6zcbSwIAAEoIAAASAAAAAAAAAAAAAAAAAGgwAAB3b3JkL2ZvbnRUYWJsZS54bWxQSwECLQAUAAYACAAAACEAHOvHN3oBAADKAgAAEAAAAAAAAAAAAAAAAADjMgAAZG9jUHJvcHMvYXBwLnhtbFBLBQYAAAAADgAOAIADAACTNQAAAAA=\"\r\n}",
LAST);
作者:
fhhh_eyou
时间:
2016-3-25 10:55
确认一下服务器、客户端都支持64位
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2