51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

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

[求助] LR如何做关联

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2015-8-11 16:33:05 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
下面录制的脚本中需要对第一个请求返回的结果做关联,然后第二个请求发送的内容中<infos></infos>的内容就是之前关联的结果,我在第一个请求前面添加了一个关联函数,但是回放时报错,是哪里设置的不对吗?
web_reg_save_param_ex(
                "ParamName=temp",
                "LB=<infos>",
                "RB=</infos>",
                "Ordinal=All",
                SEARCH_FILTERS,
                "ContentType=text/html",
                LAST);
        web_set_max_html_param_len("9999999");
web_custom_request("engine",
                "URL=http://192.168.1.36:8097/platform/engine?post_type=1&charset=UTF8",
                "Method=POST",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.1.36:8097/platform/zlcx/aq.action",
                "Snapshot=t33.inf",
                "Mode=HTML",
                "EncType=text/xml",
                "BodyBinary=<root><patient>\n<patientNo>00012345</patientNo><name>寮犱笁</name><birthday>1999-02-19</birthday><height>170cm</height><weight>60kg</weight><timeOfPreg></timeOfPreg><birthWeight>3000g</birthWeight><bsa></bsa><IDCard>330101201501010001</IDCard><address>鏉窞甯傛枃浜岃矾328鍙峰瘜涓界鎶\\x80澶у帵</address><phoneNo>0571-88393830</phoneNo><department></department><departId></departId><presNo>111194780</presNo><presType>瑗胯嵂鏂\\xB9</presType><eventNo>2015061500123</eventNo><payType"
                ">甯傚尰淇\\x9D</payType><diagnose></diagnose><main_diagnose></main_diagnose><totalAmount></totalAmount><areaNo></areaNo><bedNo></bedNo><notes></notes><icd10></icd10><allergyList></allergyList><scr></scr><ccr></ccr><bmi></bmi><ast></ast><alt></alt><drugSensivity></drugSensivity><docId>000123</docId><docName>鏉庡尰鐢\\x9F</docName><docTitle>涓讳换鍖荤敓</docTitle><sex>鐢\\xB7</sex><pregnancy>鍚\\xA6</pregnancy><breastFeeding>鍚\\xA6</breastFeeding><postType>1</postType><zoneId>6</zoneId><presSource"
                ">闂ㄨ瘖</presSource><dialysis>鍚\\xA6</dialysis>\n<presDateTime>2015-08-11 17:04:22</presDateTime>\n</patient>\n<operation>\n</operation>\n<prescriptions>\n<prescription><drug_no>1</drug_no><groupNo>1</groupNo><type></type><drugName>0.9%氯化钠注射液 (26366561)</drugName><drug>17255</drug><regName></regName><specification>10ml:90mg</specification><prepForm>娉ㄥ皠娑\\xB2</prepForm><manufacturerName>涓婃捣淇¤皧閲戞湵鑽笟鏈夐檺鍏徃</manufacturerName><package>1</package><quantity>1</quantity"
                "><adminRoute>闈欒剦婊存敞</adminRoute><adminFrequency>bid1</adminFrequency><adminDose>0.5g</adminDose><adminMethod>椁愬墠</adminMethod><adminGoal>娌荤枟</adminGoal><adminArea></adminArea><specialPromote></specialPromote><packUnit></packUnit><unitPrice></unitPrice><amount></amount><firstUse>鍚\\xA6</firstUse><docID></docID><docName></docName><docTitle></docTitle><department></department><departID></departID><nurseName></nurseName><startTime>2015-08-11 17:03:59</startTime><endTime>2015-08-11 17:03"
                ":59</endTime></prescription>\n</prescriptions>\n<exams>\n</exams>\n</root>",
                LAST);

        web_url("returnInfo_v2.jsp",
                "URL=http://192.168.1.36:8097/platform/returnInfo_v2.jsp?presNo=111194780&zoneId=6&post_type=1&patientNo=00012345&name=张三&presDateTime=2015-08-11%2005:04:23&resultXml=<infos><info><drug_no>2</drug_no><drug_Id>18602</drug_Id><presNO>111194780</presNO><eventNo>2015061500123</eventNo><drugName>注射用盐酸表柔比星</drugName><message>每次给药剂量不合适。</message><advice>本药静脉给药宜每次按体表面积给药不超过135mg/m2。</advice><source>1个依据</source><rt>0</rt><source_Id>0</source_Id><severity>5</"
                "severity><messageId>1415949413490</messageId><type>用法用量</type><analysisType>适宜性分析</analysisType><analysisResultType>用法用量</analysisResultType><status></status></info></infos>",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.1.36:8097/platform/zlcx/aq.action",
                "Snapshot=t34.inf",
                "Mode=HTML",
                LAST);
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
 楼主| 发表于 2015-8-11 16:34:32 | 只看该作者
test.c(74): Error -35061: No match found for the requested parameter "temp". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 9999999 bytes, use web_set_max_html_param_len to increase the parameter size          [MsgId: MERR-35061]
test.c(74): web_custom_request("engine") highest severity level was "ERROR", 2575 body bytes, 228 header bytes          [MsgId: MMSG-26388]  这个是LR返回的错误信息
回复 支持 反对

使用道具 举报

该用户从未签到

3#
 楼主| 发表于 2015-8-11 17:03:12 | 只看该作者
是不是左右边界写的不对?
回复 支持 反对

使用道具 举报

本版积分规则

关闭

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

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

GMT+8, 2024-5-24 18:01 , Processed in 0.068518 second(s), 23 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

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