51Testing软件测试论坛

标题: LR,写了一个七牛云上传图片的脚本,但是调试不通过,求大神帮忙啊!有红包打赏 [打印本页]

作者: fyy2016    时间: 2016-9-19 17:36
标题: LR,写了一个七牛云上传图片的脚本,但是调试不通过,求大神帮忙啊!有红包打赏

七牛demo:http://jssdk.demo.qiniu.io/

token可以手动上传图片时获取一次,作为调试脚本使用。

Action()
{
   
web_url("jssdk.demo.qiniu.io",
        "URL=file:///C:/Users/fengyy/AppData/Local/YNote/data/qqDED2F40169D0231AB40E2731483A070E/d8e9f6392f6b42c9a02e45673da7a111/tydyecokvdyb.pnghttp://jssdk.demo.qiniu.io/",
        "Resource=0",
        "RecContentType=textml",
        "Referer=",
        "Snapshot=t1.inf",
        "Mode=HTML",
        EXTRARES,
        "Url=/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.eot?", ENDITEM,
        "Url=/uptoken", ENDITEM,
        "Url=/images/loading.gif", ENDITEM,
        "Url=file:///C:/Users/fengyy/AppData/Local/YNote/data/qqDED2F40169D0231AB40E2731483A070E/c89991e9917f4c5ca8bdacc4c4d7a7b3/moq4v_%7Dph%5Dyc.pnghttp://7xocov.com2.z0.glb.qiniucdn.com/Koala.jpg?imageView2/1/w/100/h/100", ENDITEM,
        "Url=file:///C:/Users/fengyy/AppData/Local/YNote/data/qqDED2F40169D0231AB40E2731483A070E/c89991e9917f4c5ca8bdacc4c4d7a7b3/moq4v_%7Dph%5Dyc.pnghttp://7xocov.com2.z0.glb.qiniucdn.com/Koala.jpg?imageInfo", ENDITEM,
        "Url=file:///C:/Users/fengyy/AppData/Local/YNote/data/qqDED2F40169D0231AB40E2731483A070E/c89991e9917f4c5ca8bdacc4c4d7a7b3/moq4v_%7Dph%5Dyc.pnghttp://7xocov.com2.z0.glb.qiniucdn.com/Penguins.jpg?imageView2/1/w/100/h/100", ENDITEM,
        "Url=file:///C:/Users/fengyy/AppData/Local/YNote/data/qqDED2F40169D0231AB40E2731483A070E/c89991e9917f4c5ca8bdacc4c4d7a7b3/moq4v_%7Dph%5Dyc.pnghttp://7xocov.com2.z0.glb.qiniucdn.com/Penguins.jpg?imageInfo", ENDITEM,
        LAST);



    web_custom_request("upload.qiniu.com",
        "URL=file:///C:/Users/fengyy/AppData/Local/YNote/data/qqDED2F40169D0231AB40E2731483A070E/d8e9f6392f6b42c9a02e45673da7a111/tydyecokvdyb.pnghttp://upload.qiniu.com/",
        "Method=OPTIONS",
        "Resource=0",
        "Referer=",
        "Snapshot=t2.inf",
        "Mode=HTML",
        LAST);

    web_submit_data("upload.qiniu.com_2",
        "Action=file:///C:/Users/fengyy/AppData/Local/YNote/data/qqDED2F40169D0231AB40E2731483A070E/d8e9f6392f6b42c9a02e45673da7a111/tydyecokvdyb.pnghttp://upload.qiniu.com/",
        "Method=POST",
        "EncType=multipart/form-data",
        "RecContentType=application/json",
        "Referer=file:///C:/Users/fengyy/AppData/Local/YNote/data/qqDED2F40169D0231AB40E2731483A070E/d8e9f6392f6b42c9a02e45673da7a111/tydyecokvdyb.pnghttp://jssdk.demo.qiniu.io/",
        "Snapshot=t3.inf",
        "Mode=HTML",
        ITEMDATA,
        "Name=name", "Value=jjyjj.jpg", ENDITEM,
        "Name=chunk", "Value=0", ENDITEM,
        "Name=chunks", "Value=1", ENDITEM,
        "Name=key", "Value=jjyjj.jpg", ENDITEM,
        "Name=token", "Value=JOiPUijNB0t8vbNKIufpn5gDKmg0G-uFHBlrQoV2:VI3yrEAxmR5Ad3UY2AeY5v9DRTQ=:eyJzY29wZSI6Impzc2RrIiwiZGVhZGxpbmUiOjE0NzI3MDI4MTR9", ENDITEM,
       "Name=file", "Value=kkk.jpg","File=yes",ENDITEM,
        LAST);

return 0;
}





一运行就报400错误





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