标签:
接口返回数据既不是资源类文件也不包含额外文件,故脚本如下
//获取创建订单返回状态码 web_reg_find("Search=Body", "SaveCount=createorderstatus", "Text=status\":1", LAST); // lr_rendezvous("创建订单"); lr_start_transaction("创建订单"); lr_think_time(1); web_add_auto_header("channel_id","1"); web_url("创建订单", "URL=http://192.168.1.100/service?action=order_Add&plan_id=1408587300000012807&seat_nos={seat_nos}&channel_order_no=123456789&channel_price=1&1=1", "Resource=0", "RecContentType=text/html", "Mode=HTML", LAST ); // 判断创建订单是否成功,不成功直接退出脚本 if (atoi(lr_eval_string("{createorderstatus}")) > 0){ lr_end_transaction("创建订单",LR_PASS); } else{ lr_end_transaction("创建订单",LR_FAIL); return 0; }
标签:
原文地址:http://www.cnblogs.com/mayibanjiah/p/4212880.html