51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 3001|回复: 2
打印 上一主题 下一主题

[求助] json格式下录制脚本问题

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2014-4-18 14:56:27 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
用LR录制http下json格式的脚本,总是不对,请大侠们看下,如何定义json_txt,还是我的脚本有什么错误的地方,所有参数必须要传入json_txt这个参数中,json_txt是程序中定义的参数。
场景是:通过网站收集到报文中的信息,网站封装后传入我方服务,我分服务定义了json_txt参数用于接收。
脚本如下:#include "web_api.h"

Action()
{
   
    web_custom_request("IPPUSH_SETTING",
    "Method=POST",
    "URL=http://172.30.112.150:8002/spdbccceappchan/MainServlet",
    "RecContentType=application/x-www-form-urlencoded;charset=UTF-8",
    "EncType=application/x-www-form-urlencoded;charset=UTF-8",
    "Mode=HTML",
    RAW_BODY_START,
        "json_txt={'body':{'sourcetype':'01','applicationid':133,'status':'1','banknumber':'0310','shenqingshucode':'ddd','fushucardnumber':'0','zhufucardflag':'1','citycode':'SH','channelcode':'ZX99','jinjiantype':'IZX9','promotionid':'1403OR','shenqingkaproduct':'53','receiveddate':'20140404','microfilm':'000000','cardfrombankcode':'9999','shenqingrencardtype':'01','shengqingrencardnumber':'650108198505190027','fazhenjiguan':'','idsuoquzhishi':'','shenqingrenshebaokanumber':'','shenqingrenzhongwenminchen':'赵静雯','shenqingrenpinyin':'ABC','shenqingrenenglishname':'','shenqingrensex':'F','shenqingrenbirthdate':'20140401','shenqingrennationality':'chi','shenqingrenmaritalstatus':'a','shenqingrenlevelofducation':'H','shenqingrenstation':'ss','shenqingrenzhicheng':'','shenqingrenzhiye':'jsy','shenqingrenlanguagecode':'02','shenqignrenfamliyareacode':'20','shenqingrenfamliytel':'35848444','shenqingrenmobilenumber':'13817454545','shenqingrenemail':'111@162.COM','shenqingrenfaxnumber':'','isphotocard':'1','isstaffcard':'0','shenqingrencustomertype':'','famliyaddresszone1':'上海','famliyaddresszone2':'上海','famliyaddresszone3':'东方路1','famliyaddresszone4':'sdfa','famliyaddresszone5':'dsaf','famliypostcode':'200120','famliyhousestatus':'1','liveyears':'5','yuerent':'','baoxianzhishi':'','shouruzhishu':'','danweigongzidan':'','gerensuodeshuicopies':'','incomedepositcopies':'','bankinfo':'','qianmingzhishi':'','isotherdeposit':'','ismortgageloan':'','companyclassifycmp':'','isaccepttelephoneconsultation':'','isacceptletter':'','caichanprovetype':'','caichanvalue':'','caichanotaindate':'','caichanprovetype2':'','caichanvalue2':'','caichanotaindate2':'','zonggongling':5,'pufabankclient':'','yichiyoupufaproduct':'','createpufaclientdate':'','shenqingrenpufarelation':'','hujiarea1':'','hujiarea2':'','hujiarea3':'','hujiarea4':'','hujiarea5':'','hujipostcode':'','fangchanarea1':'','fangchanarea2':'','fangchanarea3':'','fangchanarea4':'','fangchanarea5':'','fangchanpostcode':'','fangwuprice':'','fangwuloanyears':'','zigoucheliangbrand':'','zigoucheliangdate':'','zigoucheliangnumber':'','zigoucheliangsituation':'','zigoucheliangprice':'','zigoucheliangyuehuankuane':'','gongsiaddressarea1':'上啊哈iq','gongsiaddressarea2':'浦东','gongsiaddressarea3':'大宋','gongsiaddressarea4':'dsaf','gongsiaddressarea5':'dasf','gongsipostcode':'200120','gongsizhongwenname':'电视剧','gongsibumen':'角度','gongsizhiwu':'捷克首','gongsiindustrytype':'IT','gongsienterprise':'','gongsiproperties':'1','gongsiscale':'','gongsitelareacode':'021','gongsitel':'28454544','gongsitelextension':'021','qitatelareacode':'','qitatel':'','qitatelextension':'','gongsiserviceyears':'1','shenqingrenincome':200000,'qitaincome':'','shoudaoincomecertificatedate':'','gerenmainincomesource':'','qitaincomesource':'','oldcompanyname':'','oldcompanypost':'','oldcompanytitle':'','oldcompanytel':'','oldcompanyserviceyears':'','oldcompanyincome':'','oldcompanyname2':'','oldcompanyserviceyears2':'','oldcompanyincome2':'','shenqingrenraisenumber':'','shenqingrenisneedservice':'','shenqingrenobligatequestion':'','shenqingrenobligateanswer':'','zhixiqinshucertificate':'','zhixiqinshuname':'的撒','zhixiqinshutelareacode':'','zhixiqinshutel':'36854554','zhixiqinshurelation':'B','zhixiqinshumobilephone':'36854554','zhixiqinshuunit':'空间的','zhixiqinshuaddress':'的萨芬','zhixiqinshuaddresspostcode':'200120','linkman1certificate':'','linkman1name':'的萨芬','linkman1telareacode':'021','linkman1tel':'35445454','linkman1relation':'12','linkman1unit':'','linkman1address':'','linkman1addresspostcode':'','linkman1mobilephone':'13323332','linkman2certificate':'','linkman2name':'','linkman2telareacode':'','linkman2tel':'','linkman2relation':'','linkman2unit':'','linkman2mobilephone':'','linkman2address':'','linkman2addresspostcode':'','spousecertificatetype':'','spousecertificatenum':'','spousename':'','spousemobilephone':'','spousecompanyname':'','spousecompanydept':'','spousecompanypost':'','spousecompanytel':'','spousecompanyextensiontel':'','spouseincomeyears':'','homecurrencywithholdnumber':'','homecurrencywithholdtype':'','foreigncurrencywithholdnumber':'','foreigncurrencywithholdtype':'','zuhewithholdflag':'','renminbizidonggouhuihuankuan':'','zidonggouhuihuankuantype':'','gouhuilv':'','gouhuirenminbiaccout':'','shenqingrenothercreditcardnum':'','shenqingrenothercreditcardtype':'','shenqingrenothercreditcardlimi':'','projectcode':'','shenqingshutuanbannum':'','tuanbanmainshenqingrencertific':'','popularizechannel':'','popularizeorganization':'','popularizepepolenum':'0','popularizepepolename':'','popularizepepoletel':'','popularizetype':'','referrername':'','referrercardnumber':'','referrerjobnumber':'','referrerpopularizerelation':'','referrertype':'','billemail1':'B','billemail2':'','cardexpressaddress':'O','shenqingrentuziname':'0','consumptionisneedpass':'','consumptionismessage':'','billexpressway':'LT','isagreeissuecomomoncard':'','rapidissueflag':'','isneedhairpincost':'','cardexpressway':'0','cardexpresscost':'','expressbranch':'','cardlayoutnumber':'001','yixingcardlayoutnumber1':'','yixingcardlayoutnumber2':'','yixingcardlayoutnumber3':'','yixingcardlayoutnumber4':'','shenqingrenlkaidservicelevel':'','shenqingrenlkaidcostlevel':'','companynametuzinum':'','shangwukajobnum':'','daibancomapnyapplyforflag':'','isprintpassmessage':'','baijinkavalueaddservicenum':'','gexinghuaidentifyingcode':'','chaifenziduan':'','shenqingrenfamliyextensiontel':'','linkman1extenstiontel':'','linkman2extenstiontel':'','immediatefamliyextenstiontel':'','ispresetcard':'0','isssb':'N','isrealnamesystem':'N','issaleverify':'N','cardfeed1product':'','cardfeed1layout':'','cardfeed2product':'','cardfeed2layout':'','cardfeed3product':'','cardfeed3layout':'','unitexpectlimit':'','jianjianyisiqizha':'','popularizesource':'','certificatelimit':'20220706','vipflag':'','cpcbusinessnum':'','networkingverrifyflag':'','isrecivexinedu':'','keymessagemodifyflag':'','zhangjiangverrifyresult':'','flowentrustnum':'','hairpinbranchnum':'','yidonglianmingkalayoutcode':'','averagetotalassets':'','totalliabilities':'','monthquota':'','pennumber':'','openingtime':'','qf_jiashizhenghaoma':'','cardtime':'','qf_ishaschild':'0','qf_homeyearcoming':'0','qf_shanghuname':'0','qf_shanghucode':'0','theproductbrand':'0','theproductmodel':'0','qf_productcode':'0','qf_cartotalprice':'0','qf_shoufumoney':'0','qf_shenqingerdu':'0','qf_fenqiqishu':'0','qf_fenqitype':'0','qf_zichanzhengmingwenjian':'0','qf_goucheyongtu':'0','qf_qingfangdiaocha':'','qf_fenqiyingxiaorenyuancode':'0','qf_isgetnewcard':'','carstageexistingcusnum':'','organizationcode':'','referencecode':'','issecondcard':'0','hasimage':'0','parameter_1':'','parameter_2':'','parameter_3':'','parameter_4':'','parameter_5':'','maincardnumber':'','attachcardrate':'','attachfixmoney':'','connectwithattachmaincard':'','qcproduct':'','qffenqifeilv':'','paduserid':''},\"head\":{\"method\":\"uploadapplication\",\"timestamp\":\"2014040521160000\",\"sig\":\"\"}}",
        6954,
    RAW_BODY_END,                  
    LAST);
        return 0;
}
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
发表于 2014-4-20 08:09:08 | 只看该作者
楼主怎么解决的,我也遇到类似的问题
回复 支持 反对

使用道具 举报

该用户从未签到

3#
发表于 2014-4-22 10:23:16 | 只看该作者
坐等高手解决
回复 支持 反对

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-11-22 02:49 , Processed in 0.071766 second(s), 27 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表