|
大家好,我录的脚本是在数据库插入一个用户名,想通过能数化用两个虚拟用户,每个用户iteration五次,总共插入10次;所以最后数据库应增加十个用户;我也参数化了十个用户,最后报告成功,但感觉无论我怎么修改,最后数据库总是插入五条纪录, 也就是说感觉有一个VSUER没有iteration五次;因为我用一个用户iteration10次,就把这10条完全插入了.为什么呀?急,哪位高手指手一下:
我的runtime的等其它地方如下图:
file:///C:/Documents%20and%20Settings/li.li/桌面/Snap1.bmp
file:///C:/Documents%20and%20Settings/li.li/桌面/Snap2.bmp
file:///C:/Documents%20and%20Settings/li.li/桌面/Snap3.bmp
我录制的脚本如下:
#include "web_api.h"
Action()
{
web_add_cookie("key=qtoN4P0HiFM6gIV0Eix9JnFBbC3V1XnxUzFHn2G6O%2B16i1t%2Fx2%2Bahg%3D%3D; DOMAIN=119.255.1.54");
web_url("index.do",
"URL=http://119.255.1.54:9080/admin/index.do",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTTP",
LAST);
web_concurrent_start(NULL);
web_url("login_01.jpg",
"URL=http://119.255.1.54:9080/admin/images/login_01.jpg",
"Resource=1",
"RecContentType=image/jpeg",
"Referer=http://119.255.1.54:9080/admin/index.do",
LAST);
web_url("login_02.jpg",
"URL=http://119.255.1.54:9080/admin/images/login_02.jpg",
"Resource=1",
"RecContentType=image/jpeg",
"Referer=http://119.255.1.54:9080/admin/index.do",
LAST);
web_concurrent_end(NULL);
web_url("login_03.jpg",
"URL=http://119.255.1.54:9080/admin/images/login_03.jpg",
"Resource=1",
"RecContentType=image/jpeg",
"Referer=http://119.255.1.54:9080/admin/index.do",
LAST);
lr_think_time( 10 );
web_submit_data("loginAction.do",
"Action=http://119.255.1.54:9080/admin/loginAction.do",
"Method=POST",
"RecContentType=text/html",
"Referer=http://119.255.1.54:9080/admin/index.do",
"Snapshot=t2.inf",
"Mode=HTTP",
ITEMDATA,
"Name=userName", "Value=mepaytest", ENDITEM,
"Name=password", "Value=mepaytest", ENDITEM,
"Name=submit", "Value=login", ENDITEM,
LAST);
web_concurrent_start(NULL);
web_url("head.do",
"URL=http://119.255.1.54:9080/admin/head.do",
"Resource=0",
"RecContentType=text/html",
"Referer=http://119.255.1.54:9080/admin/main.do",
"Snapshot=t3.inf",
"Mode=HTTP",
LAST);
web_url("left.do",
"URL=http://119.255.1.54:9080/admin/left.do",
"Resource=0",
"RecContentType=text/html",
"Referer=http://119.255.1.54:9080/admin/main.do",
"Snapshot=t4.inf",
"Mode=HTTP",
LAST);
web_url("right.do",
"URL=http://119.255.1.54:9080/admin/right.do",
"Resource=0",
"RecContentType=text/html",
"Referer=http://119.255.1.54:9080/admin/main.do",
"Snapshot=t5.inf",
"Mode=HTTP",
LAST);
web_concurrent_end(NULL);
web_concurrent_start(NULL);
web_url("style.css",
"URL=http://119.255.1.54:9080/admin/css/style.css",
"Resource=1",
"RecContentType=text/css",
"Referer=http://119.255.1.54:9080/admin/head.do",
LAST);
web_url("logo.jpg",
"URL=http://119.255.1.54:9080/admin/images/logo.jpg",
"Resource=1",
"RecContentType=image/jpeg",
"Referer=http://119.255.1.54:9080/admin/head.do",
LAST);
web_concurrent_end(NULL);
web_concurrent_start(NULL);
web_url("style.css_2",
"URL=http://119.255.1.54:9080/admin/css/style.css",
"Resource=1",
"RecContentType=text/css",
"Referer=http://119.255.1.54:9080/admin/left.do",
LAST);
web_url("arr_open.jpg",
"URL=http://119.255.1.54:9080/admin/images/arr_open.jpg",
"Resource=1",
"RecContentType=image/jpeg",
"Referer=http://119.255.1.54:9080/admin/left.do",
LAST);
web_url("folder-open.gif",
"URL=http://119.255.1.54:9080/admin/images/folder-open.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://119.255.1.54:9080/admin/left.do",
LAST);
web_url("leaf.gif",
"URL=http://119.255.1.54:9080/admin/images/leaf.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://119.255.1.54:9080/admin/left.do",
LAST);
web_concurrent_end(NULL);
web_concurrent_start(NULL);
web_url("top_bg.jpg",
"URL=http://119.255.1.54:9080/admin/images/top_bg.jpg",
"Resource=1",
"RecContentType=image/jpeg",
"Referer=http://119.255.1.54:9080/admin/head.do",
LAST);
web_url("LeftBg.jpg",
"URL=http://119.255.1.54:9080/admin/images/LeftBg.jpg",
"Resource=1",
"RecContentType=image/jpeg",
"Referer=http://119.255.1.54:9080/admin/left.do",
LAST);
web_concurrent_end(NULL);
web_url("style.css_3",
"URL=http://119.255.1.54:9080/admin/css/style.css",
"Resource=1",
"RecContentType=text/css",
"Referer=http://119.255.1.54:9080/admin/right.do",
LAST);
web_url("add admin",
"URL=http://119.255.1.54:9080/admin/admin/add.do",
"Resource=0",
"RecContentType=text/html",
"Referer=http://119.255.1.54:9080/admin/left.do",
"Snapshot=t6.inf",
"Mode=HTTP",
LAST);
web_concurrent_start(NULL);
web_url("style.css_4",
"URL=http://119.255.1.54:9080/admin/css/style.css",
"Resource=1",
"RecContentType=text/css",
"Referer=http://119.255.1.54:9080/admin/admin/add.do",
LAST);
web_url("icon-error.gif",
"URL=http://119.255.1.54:9080/admin/images/icon-error.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://119.255.1.54:9080/admin/admin/add.do",
LAST);
web_concurrent_end(NULL);
web_url("ButtonBg.jpg",
"URL=http://119.255.1.54:9080/admin/images/ButtonBg.jpg",
"Resource=1",
"RecContentType=image/jpeg",
"Referer=http://119.255.1.54:9080/admin/admin/add.do",
LAST);
lr_think_time( 12 );
web_submit_data("save.do",
"Action=http://119.255.1.54:9080/admin/admin/save.do",
"Method=POST",
"RecContentType=text/html",
"Referer=http://119.255.1.54:9080/admin/admin/add.do",
"Snapshot=t7.inf",
"Mode=HTTP",
ITEMDATA,
"Name=admin.name", "Value={name}", ENDITEM,
"Name=admin.password", "Value=123123", ENDITEM,
"Name=password2", "Value=123123", ENDITEM,
"Name=admin.actualname", "Value=", ENDITEM,
"Name=admin.telephone", "Value=", ENDITEM,
"Name=groupId", "Value=13", ENDITEM,
"Name=admin.state", "Value=1", ENDITEM,
LAST);
web_url("icon-info.gif",
"URL=http://119.255.1.54:9080/admin/images/icon-info.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://119.255.1.54:9080/admin/admin/save.do",
LAST);
web_concurrent_start(NULL);
web_url("Gbg.jpg",
"URL=http://119.255.1.54:9080/admin/images/Gbg.jpg",
"Resource=1",
"RecContentType=image/jpeg",
"Referer=http://119.255.1.54:9080/admin/admin/save.do",
LAST);
web_url("ButtonBg.jpg_2",
"URL=http://119.255.1.54:9080/admin/images/ButtonBg.jpg",
"Resource=1",
"RecContentType=image/jpeg",
"Referer=http://119.255.1.54:9080/admin/admin/save.do",
LAST);
web_concurrent_end(NULL);
lr_think_time( 4 );
web_url("[Log out ]",
"URL=http://119.255.1.54:9080/admin/quitAction.do",
"Resource=0",
"RecContentType=text/html",
"Referer=http://119.255.1.54:9080/admin/head.do",
"Snapshot=t8.inf",
"Mode=HTTP",
LAST);
web_url("quitAction.do",
"URL=http://119.255.1.54:9080/admin/quitAction.do",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t9.inf",
"Mode=HTTP",
LAST);
web_concurrent_start(NULL);
web_url("login_01.jpg_2",
"URL=http://119.255.1.54:9080/admin/images/login_01.jpg",
"Resource=1",
"RecContentType=image/jpeg",
"Referer=http://119.255.1.54:9080/admin/quitAction.do",
LAST);
web_url("login_02.jpg_2",
"URL=http://119.255.1.54:9080/admin/images/login_02.jpg",
"Resource=1",
"RecContentType=image/jpeg",
"Referer=http://119.255.1.54:9080/admin/quitAction.do",
LAST);
web_concurrent_end(NULL);
web_url("login_03.jpg_2",
"URL=http://119.255.1.54:9080/admin/images/login_03.jpg",
"Resource=1",
"RecContentType=image/jpeg",
"Referer=http://119.255.1.54:9080/admin/quitAction.do",
LAST);
return 0;
} |
|