51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 1628|回复: 1
打印 上一主题 下一主题

[原创] 请教大家,为什么场景中通过的事务数与实际不符,比实际多。

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2011-9-27 10:29:09 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 guyue_hzm 于 2011-9-27 10:41 编辑

录制一个场景:登录,登录后判断是否有需要处理的事件,如果有,判断是用A方式处理,还是B方式处理,分别对A方式处理和B方式处理设置为事务A和事务B,处理完退出。    执行场景后,A方式处理通过196个,B方式处理,通过89个,但到程序中查询,发现A方式实际处理了94个,B方式实际处理了85个,与结果不符。请问是什么原因?
中间部分脚本如下:
        if (strcmp(lr_eval_string("{incidentID}"),"")!=0)  {

        /*打开事件*/
               
        web_url("incident!loadInicdentOperate.do",
                "URL=http://192.168.104.124:8080/hd/incident!loadInicdentOperate.do?currentActivityRecordId=4028e8fc32609999013260c308580028&taskId={taskID}&incidentId={incidentID}&currentActivityPropertyId=4028e8fc32422de50132426415a0020d&activityStatus=0&processedGroupId=4028e8fc32422de50132424e340101a1&processedItCode={Itcode}",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.104.124:8080/hd/workDesk!findWorkTabInfo.do?tabNum=0&projectId=4028e8fc32422de50132424274fc0019&viewflag=&itcode=1114",
                "Snapshot=t65.inf",
                "Mode=HTML",
                EXTRARES,
                                …………………………
                LAST);



        web_url("workInfo!findWorkInfo.do",
                "URL=http://192.168.104.124:8080/hd/workInfo!findWorkInfo.do?projectId=4028e8fc32422de50132424274fc0019&incidentId={incidentID}&isExaminationActivity=true",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.104.124:8080/hd/workInfo!initAddWorkInfo.do?projectId=4028e8fc32422de50132424274fc0019&incidentId={incidentID}&activityPropertyId=4028e8fc32422de50132426415a0020d&isExaminationActivity=true&processedGroupId=4028e8fc32422de50132424e340101a1&processedItCode={Itcode}&processIncidentFlag=",
                "Snapshot=t66.inf",
                "Mode=HTML",
                EXTRARES,
                ………………………………
                LAST);

         if (strcmp(lr_eval_string("{jiedian}"),"处理")==0) {
       
        /*A方式处理*/
        lr_start_transaction("Afangan");

        web_submit_data("incident!signalIncidentTask.do",
                "Action=http://192.168.104.124:8080/hd/incident!signalIncidentTask.do?incidentParamView.incidentId={incidentID}&incidentParamView.incidentType1=&incidentParamView.incidentType2=&taskId={taskID}&transitionName=%E5%A4%84%E7%90%86%E5%AE%8C&nextActivityAssginees={Itcode}&sourceActivityName=%E5%A4%84%E7%90%86&destActivityName=%E5%A4%84%E7%90%86%E5%AE%8C%E6%88%90&nextActivityAssigneeOrgId=4028e8fc32422de50132423418780003&nextActivityAssigneeGroupId=4028e8fc32422de50132424e340101a1&"
                "usedMessage=false&usedShortMessage=false&usedEmail=false&processContent=&projectId=4028e8fc32422de50132424274fc0019&projectRoleId=4&isSelfProcess=true",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://192.168.104.124:8080/hd/incident!loadInicdentOperate.do?currentActivityRecordId=4028e8fc32609999013260c308580028&taskId={taskID}&incidentId={incidentID}&currentActivityPropertyId=4028e8fc32422de50132426415a0020d&activityStatus=0&processedGroupId=4028e8fc32422de50132424e340101a1&processedItCode={Itcode}",
                "Snapshot=t70.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=processIncidentFlag", "Value=", ENDITEM,
                "Name=processedGroupId", "Value=4028e8fc32422de50132424e340101a1", ENDITEM,
                "Name=processedItCode", "Value={Itcode}", ENDITEM,
                "Name=currentActivityRecordId", "Value=4028e8fc32609999013260c308580028", ENDITEM,
                "Name=view_operate_flag", "Value=1", ENDITEM,
                "Name=view_search_flag", "Value=", ENDITEM,
                "Name=incidentVo.incident.incidentDescription", "Value=压力测试详细描述", ENDITEM,
                EXTRARES,
                …………………………
                LAST);

        web_url("workInfo!findWorkInfo.do_3",
                "URL=http://192.168.104.124:8080/hd/workInfo!findWorkInfo.do?projectId=4028e8fc32422de50132424274fc0019&incidentId={incidentID}&isExaminationActivity=true",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.104.124:8080/hd/workInfo!initAddWorkInfo.do?projectId=4028e8fc32422de50132424274fc0019&incidentId={incidentID}&activityPropertyId=4028e8fc32422de501324264b1440210&isExaminationActivity=true&processedGroupId=&processedItCode={Itcode}&processIncidentFlag=",
                "Snapshot=t71.inf",
                "Mode=HTML",
                EXTRARES,
                …………………………
                LAST);

        lr_end_transaction("Afangan", LR_AUTO);
   
                 }
                 else if (strcmp(lr_eval_string("{jiedian}"),"处理完成")==0) {

                   /*B方式处理*/

                lr_start_transaction("Bfangan");
       
                web_url("incident!toCloseIncident.do",
                        "URL=http://192.168.104.124:8080/hd/incident!toCloseIncident.do?date=Tue%20Sep%2013%2011:11:53%20UTC+0800%202011",
                        "Resource=0",
                        "RecContentType=text/html",
                        "Referer=",
                        "Snapshot=t75.inf",
                        "Mode=HTML",
                        EXTRARES,
                        …………………………
                        LAST);
       
       
                web_submit_data("incident!closeIncident.do",
                        "Action=http://192.168.104.124:8080/hd/incident!closeIncident.do?incidentCloseReason=12&incidentCloseDescription=&incidentParamView.incidentId={incidentID}&incidentParamView.incidentType1=&incidentParamView.incidentType2=&taskId={taskID}&transitionName=%E5%85%B3%E5%8D%95&nextActivityAssginees=&sourceActivityName=%E5%A4%84%E7%90%86%E5%AE%8C%E6%88%90&destActivityName=%E7%BB%93%E6%9D%9F1&nextActivityAssigneeOrgId=&nextActivityAssigneeGroupId=&usedMessage=false&usedShortMessage=false&"
                        "usedEmail=false&processContent=&projectId=4028e8fc32422de50132424274fc0019",
                        "Method=POST",
                        "RecContentType=text/html",
                        "Referer=http://192.168.104.124:8080/hd/incident!loadInicdentOperate.do?incidentId={incidentID}&taskId={taskID}&processedItCode={Itcode}&currentActivityPropertyId=4028e8fc32422de501324264b1440210&activityStatus=0&currentActivityRecordId=4028e8fc32609999013260c3df5f002f",
                        "Snapshot=t77.inf",
                        "Mode=HTML",
                        ITEMDATA,
                        "Name=processIncidentFlag", "Value=", ENDITEM,
                        "Name=processedGroupId", "Value=", ENDITEM,
                        "Name=processedItCode", "Value={Itcode}", ENDITEM,
                        "Name=currentActivityRecordId", "Value=4028e8fc32609999013260c3df5f002f", ENDITEM,
                        "Name=view_operate_flag", "Value=1", ENDITEM,
                        "Name=view_search_flag", "Value=", ENDITEM,
                        "Name=incidentVo.incident.incidentDescription", "Value=压力测试详细描述", ENDITEM,
                        EXTRARES,
                        ………………………………
                        LAST);
       
                        lr_end_transaction("Bfangan", LR_AUTO);

          }
        }
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
发表于 2011-9-27 10:49:21 | 只看该作者
事物通过了并不代表你的实际业务一定成功,结合日志分析下。
是不是用户名在参数化取值的时候,重复了。导致同一个用户在登录,处理A事物过程中,被重新登录。导致记录错误
回复 支持 反对

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-10-6 14:27 , Processed in 0.082064 second(s), 28 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表