TA的每日心情 | 衰 2015-8-28 10:45 |
---|
签到天数: 14 天 连续签到: 1 天 [LV.3]测试连长
|
500个不用的用户登录P2P网站,每个用户进行10此投资。我把登录脚本录制在init里面了,然后登录用户名进行了参数化,投资脚本放在Action里面了,标号进行的参数化。为什么进行场景执行的时候,init里面就取了一个参数进行登录而已呢,然后这个用户就一直在重复投资。脚本如下:
vuser_init()
{web_submit_data("login_2",
"Action=http://120.24.90.251:7001/login",
"Method=POST",
"RecContentType=text/html",
"Referer=http://120.24.90.251:7001/login",
"Snapshot=t7.inf",
"Mode=HTTP",
ITEMDATA,
"Name=username", "Value={username}", ENDITEM,
"Name=password", "Value=ef7752a178c48657a95bb6305993de1b", ENDITEM,
"Name=check", "Value=on", ENDITEM,
LAST);
return 0;
}
action:
login_bid()
{web_submit_data("bid.html",
"Action=http://xxxxx:7001/bidinfo/bid.html",
"Method=POST",
"RecContentType=text/html",
"Referer=http://xxxxx:7001/bidinfo/step2.html",
"Snapshot=t23.inf",
"Mode=HTTP",
ITEMDATA,
"Name=product_no", "Value={product_no}", ENDITEM,
"Name=product_type", "Value=AA", ENDITEM,
"Name=invest_money", "Value=5.0", ENDITEM,
"Name=interest_money", "Value=0.07", ENDITEM,
"Name=jjs_token", "Value=", ENDITEM,
"Name=type", "Value=", ENDITEM,
"Name=trans_pwd", "Value=c8837b23ff8aaa8a2dde915473ce0991", ENDITEM,
LAST);
return 0;
}
参数配置的都是:Sequential Each iteration
求高手赐教一下,谢谢啦 |
|