51Testing软件测试论坛

标题: 请高手指点!非常感谢 [打印本页]

作者: zp1314    时间: 2007-1-29 10:02
标题: 请高手指点!非常感谢
本人想使用ld自带的订票例子来学习ld,创建了一个包含订票例子中要填入的注册信息(Username,Password ,Confirm, ,First Name,Last Name,Street Address,City/State/Zip)对应的dat文件(数据共10行),然后在controller中指定了10个vuser,在controller未进行其他配置,然后进行压力测试,但是运行结束后,发现不能将10个注册信息进行注册,即不能采用dat文件中的信息进行注册.

1 vuser脚本中的action部门如下,vuser_init和vuser_end和它们默认的一样:
#include "web_api.h"


Action()
{

        web_url("MercuryWebTours",
                "URL=http://localhost/MercuryWebTours/",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t1.inf",
                "Mode=HTML",
                LAST);
        lr_think_time(3);


        web_submit_data("login.pl",
                "Action=http://localhost/MercuryWebTours/login.pl",
                "Method=POST",
                "TargetFrame=body",
                "RecContentType=text/html",
                "Referer=http://localhost/MercuryWebTours/nav.pl?in=home",
                "Snapshot=t2.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=userSession", "Value=94772.2729040097tiHtitipHiHfcQctQpAQcHcf", ENDITEM,
                "Name=username", "Value=", ENDITEM,
                "Name=password", "Value=", ENDITEM,
                "Name=JSFormSubmit", "Value=off", ENDITEM,
                "Name=signup.x", "Value=46", ENDITEM,
                "Name=signup.y", "Value=9", ENDITEM,
                LAST);
        lr_think_time(25);

        web_submit_data("login.pl_2",
                "Action=http://localhost/MercuryWebTours/login.pl",
                "Method=POST",
                "TargetFrame=body",
                "RecContentType=text/html",
                "Referer=http://localhost/MercuryWebTours/login.pl?username=&password=&getInfo=true",
                "Snapshot=t3.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=username", "Value={name}", ENDITEM,
                "Name=password", "Value={pass}", ENDITEM,
                "Name=passwordConfirm", "Value={passwordcon}", ENDITEM,
                "Name=firstName", "Value={firt}", ENDITEM,
                "Name=lastName", "Value={last}", ENDITEM,
                "Name=address1", "Value={address1}", ENDITEM,
                "Name=address2", "Value={address2}", ENDITEM,
                "Name=register.x", "Value=46", ENDITEM,
                "Name=register.y", "Value=23", ENDITEM,
                LAST);

        web_url("continue.gif",
                "URL=http://localhost/MercuryWebTours/welcome.pl?page=menus",
                "TargetFrame=body",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://localhost/MercuryWebTours/login.pl",
                "Snapshot=t4.inf",
                "Mode=HTML",
                LAST);

        web_url("SignOff Button",
                "URL=http://localhost/MercuryWebTours/welcome.pl?signOff=1",
                "TargetFrame=body",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://localhost/MercuryWebTours/nav.pl?page=menu&in=home",
                "Snapshot=t5.inf",
                "Mode=HTML",
                LAST);

        return 0;
}

2 vuser中脚本中参数设置的参见附件
作者: zp1314    时间: 2007-1-29 10:37
标题: up
up
作者: zp1314    时间: 2007-1-29 11:35
标题: 继续up
继续up
作者: zp1314    时间: 2007-1-29 13:25
标题: ??
sdlkfj9
作者: zp1314    时间: 2007-1-29 15:32
标题: upupup
upupup
作者: Koffer    时间: 2007-1-29 16:01
所有的参数是否都指向同一个文件,确保他们都能在运行时选中同一行。
在“Select next row", 选择 the same as XXX.
作者: zp1314    时间: 2007-1-29 16:08
标题: 谢谢
能解释的在清楚一下吗




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2