51Testing软件测试论坛

标题: 录制不同用户写作功能,但是写作内容只写入了第一个用户那里是为什么 [打印本页]

作者: lllo    时间: 2016-9-6 09:52
标题: 录制不同用户写作功能,但是写作内容只写入了第一个用户那里是为什么
对用户名和密码还有写作内容进行参数化,迭代设置为两次。运行回放时,日志中提示了用户名替换为A,但是写作内容都新增到了B用户那里,这是为什么?
望各位大神帮忙解答

作者: lllo    时间: 2016-9-6 09:56
Action()
{
        web_add_cookie("bdshare_firstime=1472782220512; DOMAIN=yx.testrighthere.com");

        web_add_cookie("pt2gguin=o1909296483; DOMAIN=s.pc.qq.com");

        web_add_cookie("RK=q22Gp/fTY2; DOMAIN=s.pc.qq.com");

        web_add_cookie("ptcz=dc49ef3d8f4c27937569c1b1a59838feb4a3023712a45d26413fd046f1f30bfc; DOMAIN=s.pc.qq.com");

        web_url("ResourceEdit",
                "URL=http://yx.testrighthere.com/Resource/ResourceEdit/?CID=32",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t1.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=/Scripts/layer/skin/layer.css", "Referer=http://yx.testrighthere.com/Web/Login", ENDITEM,
                "Url=/images/login_bg.jpg", "Referer=http://yx.testrighthere.com/Web/Login", ENDITEM,
                "Url=/images/login_input02.png", "Referer=http://yx.testrighthere.com/Web/Login", ENDITEM,
                "Url=/images/login_butn01.png", "Referer=http://yx.testrighthere.com/Web/Login", ENDITEM,
                "Url=/images/img_footer.png", "Referer=http://yx.testrighthere.com/Web/Login", ENDITEM,
                "Url=/images/login_input03.png", "Referer=http://yx.testrighthere.com/Web/Login", ENDITEM,
                "Url=/images/login_input01.png", "Referer=http://yx.testrighthere.com/Web/Login", ENDITEM,
                "Url=http://s.pc.qq.com/pcmgr/zonedword/gjzonedword20150522.js", "Referer=http://yx.testrighthere.com/Web/Login", ENDITEM,
                "Url=http://passport.testrighthere.com/ajax/login.ashx?t=1&u=Z3oyMzB8OTZFNzkyMTg5NjVFQjcyQzkyQTU0OURENUEzMzAxMTI.&callback=jQuery182003850278717777994_1473045072590&_=1473045112721", "Referer=http://yx.testrighthere.com/Web/Login", ENDITEM,
                LAST);

        lr_start_transaction("login");

        lr_rendezvous("loginn");

        lr_think_time(34);
/*
        web_reg_save_param("id",
                "LB=",
                "RB=",
                "Ord=1",
                "RelFrameId={Name}",
                //"IgnoreRedirections=Yes",
                LAST);
*/


        web_submit_data("CheckLogin",
                "Action=http://yx.testrighthere.com/Web/CheckLogin",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://yx.testrighthere.com/Web/Login",
                "Snapshot=t2.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=vCode", "Value=2211", ENDITEM,
                "Name=uName", "Value={Name}", ENDITEM,
                "Name=uPass", "Value={pwd}", ENDITEM,
                LAST);

        web_custom_request("InsertLoginPoint",
                "URL=http://yx.testrighthere.com/Web/InsertLoginPoint",
                "Method=POST",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://yx.testrighthere.com/Web/Login",
                "Snapshot=t3.inf",
                "Mode=HTML",
                "EncType=",
                LAST);

        web_custom_request("GetTopCID",
                "URL=http://yx.testrighthere.com/Web/GetTopCID",
                "Method=POST",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://yx.testrighthere.com/Web/Login",
                "Snapshot=t4.inf",
                "Mode=HTML",
                "EncType=",
                LAST);

        web_add_cookie("pt2gguin=o1909296483; DOMAIN=c.gj.qq.com");

        web_add_cookie("RK=q22Gp/fTY2; DOMAIN=c.gj.qq.com");

        web_add_cookie("ptcz=dc49ef3d8f4c27937569c1b1a59838feb4a3023712a45d26413fd046f1f30bfc; DOMAIN=c.gj.qq.com");

        //添加检查点
        web_reg_find("Search=Body",
                "SaveCount=ac",
                "Text=来到教师研修社区",
                LAST);

        web_url("UserPersonIndex",
                "URL=http://yx.testrighthere.com/UserPerson/UserPersonIndex/?CID=32",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://yx.testrighthere.com/Web/Login",
                "Snapshot=t5.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=/images/icon_02.jpg", "Referer=http://yx.testrighthere.com/UserPerson/UserPersonIndex/?CID=32", ENDITEM,
                "Url=/images/bg_0729.jpg", "Referer=http://yx.testrighthere.com/UserPerson/UserPersonIndex/?CID=32", ENDITEM,
                "Url=/images/bg_title.jpg", "Referer=http://yx.testrighthere.com/UserPerson/UserPersonIndex/?CID=32", ENDITEM,
                "Url=/images/bg_banner_shadow.gif", "Referer=http://yx.testrighthere.com/UserPerson/UserPersonIndex/?CID=32", ENDITEM,
                "Url=/images/bg_head.jpg", "Referer=http://yx.testrighthere.com/UserPerson/UserPersonIndex/?CID=32", ENDITEM,
                "Url=/images/bg_button.jpg", "Referer=http://yx.testrighthere.com/UserPerson/UserPersonIndex/?CID=32", ENDITEM,
                "Url=/images/info.gif", "Referer=http://yx.testrighthere.com/UserPerson/UserPersonIndex/?CID=32", ENDITEM,
                "Url=/images/pic.gif", "Referer=http://yx.testrighthere.com/UserPerson/UserPersonIndex/?CID=32", ENDITEM,
                "Url=/images/icon_hf.png", "Referer=http://yx.testrighthere.com/UserPerson/UserPersonIndex/?CID=32", ENDITEM,
                "Url=/images/icon_TeamLeader.jpg", "Referer=http://yx.testrighthere.com/UserPerson/UserPersonIndex/?CID=32", ENDITEM,
                "Url=/images/icon_JF.jpg", "Referer=http://yx.testrighthere.com/UserPerson/UserPersonIndex/?CID=32", ENDITEM,
                "Url=http://mat1.gtimg.com/www/sogou/sogou_tips_v1.png", "Referer=http://yx.testrighthere.com/UserPerson/UserPersonIndex/?CID=32", ENDITEM,
                "Url=http://c.gj.qq.com/fcgi-bin/mailreport?gjguid=888bdd41c8d21271aadfc6d7089fce76&monitorid=618069&bid=1&query=&refer=http%3A%2F%2Fyx.testrighthere.com%2FUserPerson%2FUserPersonIndex%2F%3FCID%3D32", "Referer=http://yx.testrighthere.com/UserPerson/UserPersonIndex/?CID=32", ENDITEM,
                LAST);

        if(atoi(lr_eval_string("{ac}"))>0)
                lr_output_message("成功进入研修社区");
        else
                lr_error_message("进入研修社区失败");

        lr_end_transaction("login",LR_AUTO);

        web_add_cookie("pt2gguin=o1909296483; DOMAIN=c.gj.qq.com");

        web_add_cookie("RK=q22Gp/fTY2; DOMAIN=c.gj.qq.com");

        web_add_cookie("ptcz=dc49ef3d8f4c27937569c1b1a59838feb4a3023712a45d26413fd046f1f30bfc; DOMAIN=c.gj.qq.com");

        //web_reg_find("Text=DA",
        //        LAST);

        web_submit_data("ResourceEdit_3",
                "Action=http://yx.testrighthere.com/Resource/ResourceEdit/?CID=32",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://yx.testrighthere.com/Resource/ResourceEdit/?CID=32",
                "Snapshot=t9.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=Title", "Value={title}", ENDITEM,
                "Name=RCategory", "Value={rcategory}", ENDITEM, //资源类型
                "Name=GradeID", "Value={gradeid}", ENDITEM, //学段
                "Name=SubjectID", "Value={subjectid}", ENDITEM, //学科
                "Name=RVersionID", "Value={rversionid}", ENDITEM, //资源版本
                "Name=RBookName", "Value={book}", ENDITEM,
                "Name=Author", "Value=敏智", ENDITEM,
                "Name=Lesson", "Value=5", ENDITEM,
                "Name=IsPublic", "Value={ispublic}", ENDITEM,
                "Name=upfile", "Value=", ENDITEM,
                "Name=RContent", "Value=<p>{content}</p>", ENDITEM,
                "Name=AttTitle", "Value=cc", ENDITEM,
                "Name=AttType", "Value={type}", ENDITEM,
                "Name=AttPath", "Value={path}", ENDITEM,
                "Name=backUrl", "Value=http://yx.testrighthere.com/UserPerson/UserPersonIndex/?CID=32", ENDITEM,
                "Name=ResourceState", "Value={state}", ENDITEM, //状态:1草稿,2已发布
                "Name=ID", "Value=0", ENDITEM,
                "Name=ResType", "Value=1", ENDITEM,
                "Name=AID", "Value=0", ENDITEM,
                "Name=GroupID", "Value=0", ENDITEM,
                "Name=Step", "Value=0", ENDITEM,
                "Name=CreateBy", "Value=", ENDITEM,
                EXTRARES,
                "Url=http://mat1.gtimg.com/www/sogou/sogou_tips_v1.png", "Referer=http://yx.testrighthere.com/UserPerson/UserPersonIndex/?CID=32", ENDITEM,
                "Url=http://c.gj.qq.com/fcgi-bin/mailreport?gjguid=888bdd41c8d21271aadfc6d7089fce76&monitorid=618069&bid=1&query=&refer=http%3A%2F%2Fyx.testrighthere.com%2FUserPerson%2FUserPersonIndex%2F%3FCID%3D32", "Referer=http://yx.testrighthere.com/UserPerson/UserPersonIndex/?CID=32", ENDITEM,
                LAST);

        return 0;
}
作者: jingzizx    时间: 2016-9-9 13:49
是不是需要注销操作




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