51Testing软件测试论坛

标题: 脚本回放问题 [打印本页]

作者: zxcqaz    时间: 2015-2-2 15:32
标题: 脚本回放问题
各位大侠,我在discuz网站上录制了一个用户发帖的脚本,录制后回放成功,然后我把登录用户直接修改成另一个用户,再次回放,脚本运行通过,但是帖子没有发表成功,运行过程中我看到提示是说什么表单不正确,提交帖子不成功,这是为什么??请大侠们教我如何解决~~大谢
作者: 地壳    时间: 2015-2-2 16:02
应该是相关数据未做关联;
例如服务器针对每一个用户都会分配一个session ID,用户登录之后进行操作,发送的请求及接收的数据,都是与这个ID相关联的,你只改了用户登录名显然是不全面的。
作者: 仰望实现    时间: 2015-2-3 13:38
你要贴代码出来,你就这样说,谁看的出来啥问题啊
作者: zxcqaz    时间: 2015-2-3 14:40
仰望实现 发表于 2015-2-3 13:38
你要贴代码出来,你就这样说,谁看的出来啥问题啊

[code]Action()
{

       

        web_url("forum.php",
                "URL=http://localhost/upload/forum.php",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t20.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=static/image/common/background.png", ENDITEM,
                "Url=static/image/common/pn.png", ENDITEM,
                "Url=static/image/common/px.png", ENDITEM,
                "Url=static/image/common/search.png", ENDITEM,
                "Url=static/image/common/arrwd.gif", ENDITEM,
                "Url=static/image/common/nv.png", ENDITEM,
                "Url=static/image/common/qmenu.png", ENDITEM,
                "Url=static/image/common/nv_a.png", ENDITEM,
                "Url=static/image/common/pt_item.png", ENDITEM,
                "Url=static/image/common/chart.png", ENDITEM,
                "Url=static/image/common/titlebg.png", ENDITEM,
                "Url=static/image/common/scrolltop.png", ENDITEM,
                "Url=../favicon.ico", "Referer=", ENDITEM,
                LAST);

        web_custom_request("urstelemetry.asmx",
                "URL=https://t.urs.microsoft.com/urstelemetry.asmx?MSTel-Client-Key=jE/obT66dG/koIGQ4xo5eA%3d%3d&MSTel-MAC=k%2bsuK3i7gos%3d",
                "Method=POST",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=text/xml",
                "Referer=",
                "Snapshot=t21.inf",
                "Mode=HTML",
                "EncType=text/xml; charset=utf-8",
                "Body=<T v=\"5\"><G>4A72F430-B40C-4D36-A068-CE33ADA5ADF9</G><D>10.0.8110.6</D><C>11.00.9600.17496</C><OS>6.1.7601.1.0</OS><I>9.11.9600.17501</I><L>zh-CN</L><O>POST</O><ID>39141208-4237-41CE-B15B-93DF69398979</ID><URL>aHR0cDovL2xvY2FsaG9zdC91cGxvYWQvZm9ydW0ucGhw</URL><RU></RU><RI>0.0.0.0</RI><HIP>127.0.0.1</HIP><UI>b99274f150d9c40d191345c6f0fe0c9d79f2cd8c0bcb4fe9a515febe3835d185</UI><S>64</S><DI>192.168.232.2</DI><Y><T>B|0|100.0000</T><T>I|0|100.0000</T><T>D|0|95.0000</T><T>P|0|100.0000|6.5000</T><T"
                ">F|2|0.0070|0.0070|0.0070</T><T>R|0|100.0000</T><T>U|2|1.0000</T><T>W|0|0.5000</T><T>H|0|100.0000</T><T>O|0|100.0000</T><T>T|0|100.0000</T><T>PP|1|100.0000</T></Y><M>NIHN</M><Fs><F><URL>aHR0cDovL2xvY2FsaG9zdC91cGxvYWQvZm9ydW0ucGhw</URL><Z>NIHN</Z><H>10410000|14|0|80000064|FC0|0,2</H><K>3a003a00</K><T>TOP</T><HIP>127.0.0.1</HIP><SC/><SH>3c7db7234f21c356</SH><NS>bG9jYWxob3N0</NS><SSL/><SSLLen/><REDIR/></F></Fs><WA/><GS/><Err/></T>",
                LAST);
        lr_start_transaction("登录");


        web_submit_data("member.php",
                "Action=http://localhost/upload/member.php?mod=logging&action=login&loginsubmit=yes&infloat=yes&lssubmit=yes&inajax=1",
                "Method=POST",
                "TargetFrame=",
                "RecContentType=text/xml",
                "Referer=http://localhost/upload/forum.php",
                "Snapshot=t22.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=fastloginfield", "Value=username", ENDITEM,
                "Name=username", "Value=caimei1", ENDITEM,
                "Name=password", "Value=123456", ENDITEM,
                "Name=quickforward", "Value=yes", ENDITEM,
                "Name=handlekey", "Value=ls", ENDITEM,
                LAST);

       

        web_url("forum.php_2",
                "URL=http://localhost/upload/forum.php",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://localhost/upload/forum.php",
                "Snapshot=t23.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=static/image/common/user_online.gif", ENDITEM,
                "Url=static/image/common/style_switch.png", ENDITEM,
                "Url=../favicon.ico", "Referer=", ENDITEM,
                "Url=static/js/common_extra.js?3Qj", ENDITEM,
                "Url=static/image/common/popupcredit_bg.gif", ENDITEM,
                "Url=static/image/common/tip_bottom.png", ENDITEM,
                LAST);
        lr_end_transaction("登录",LR_AUTO);

        web_url("默认版块",
                "URL=http://localhost/upload/forum.php?mod=forumdisplay&fid=2",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://localhost/upload/forum.php",
                "Snapshot=t24.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=static/image/common/fav.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/common/arw_r.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/common/feed.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/common/arw_l.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/common/atarget.png", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/common/refresh.png", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                LAST);

        web_url("默认版块_2",
                "URL=http://localhost/upload/forum.php?mod=forumdisplay&fid=2",
                "TargetFrame=",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2",
                "Snapshot=t25.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=static/image/common/fav.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/common/feed.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/common/arw_l.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/common/atarget.png", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/common/refresh.png", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/common/titlebg_sd.png", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/editor/editor.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/js/smilies.js?3Qj", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=data/cache/common_smilies_var.js?3Qj", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/smiley/default/sad.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/smiley/default/smile.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/smiley/default/biggrin.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/smiley/default/cry.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/smiley/default/huffy.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/smiley/default/shocked.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/smiley/default/tongue.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/smiley/default/shy.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/smiley/default/titter.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/smiley/default/sweat.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/smiley/default/mad.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/smiley/default/lol.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/smiley/default/loveliness.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/smiley/default/funk.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/smiley/default/curse.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/smiley/default/dizzy.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/smiley/default/shutup.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/smiley/default/sleepy.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/smiley/default/hug.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/smiley/default/victory.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/smiley/default/time.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/smiley/default/kiss.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/smiley/default/handshake.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/smiley/default/call.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/common/pollsmall.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                "Url=static/image/common/folder_new.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
                LAST);

        lr_start_transaction("发帖子");

作者: zxcqaz    时间: 2015-2-3 14:41
仰望实现 发表于 2015-2-3 13:38
你要贴代码出来,你就这样说,谁看的出来啥问题啊
  1. Action()
  2. {

  3.        

  4.         web_url("forum.php",
  5.                 "URL=http://localhost/upload/forum.php",
  6.                 "TargetFrame=",
  7.                 "Resource=0",
  8.                 "RecContentType=text/html",
  9.                 "Referer=",
  10.                 "Snapshot=t20.inf",
  11.                 "Mode=HTML",
  12.                 EXTRARES,
  13.                 "Url=static/image/common/background.png", ENDITEM,
  14.                 "Url=static/image/common/pn.png", ENDITEM,
  15.                 "Url=static/image/common/px.png", ENDITEM,
  16.                 "Url=static/image/common/search.png", ENDITEM,
  17.                 "Url=static/image/common/arrwd.gif", ENDITEM,
  18.                 "Url=static/image/common/nv.png", ENDITEM,
  19.                 "Url=static/image/common/qmenu.png", ENDITEM,
  20.                 "Url=static/image/common/nv_a.png", ENDITEM,
  21.                 "Url=static/image/common/pt_item.png", ENDITEM,
  22.                 "Url=static/image/common/chart.png", ENDITEM,
  23.                 "Url=static/image/common/titlebg.png", ENDITEM,
  24.                 "Url=static/image/common/scrolltop.png", ENDITEM,
  25.                 "Url=../favicon.ico", "Referer=", ENDITEM,
  26.                 LAST);

  27.         web_custom_request("urstelemetry.asmx",
  28.                 "URL=https://t.urs.microsoft.com/urstelemetry.asmx?MSTel-Client-Key=jE/obT66dG/koIGQ4xo5eA%3d%3d&MSTel-MAC=k%2bsuK3i7gos%3d",
  29.                 "Method=POST",
  30.                 "TargetFrame=",
  31.                 "Resource=0",
  32.                 "RecContentType=text/xml",
  33.                 "Referer=",
  34.                 "Snapshot=t21.inf",
  35.                 "Mode=HTML",
  36.                 "EncType=text/xml; charset=utf-8",
  37.                 "Body=<T v=\"5\"><G>4A72F430-B40C-4D36-A068-CE33ADA5ADF9</G><D>10.0.8110.6</D><C>11.00.9600.17496</C><OS>6.1.7601.1.0</OS><I>9.11.9600.17501</I><L>zh-CN</L><O>POST</O><ID>39141208-4237-41CE-B15B-93DF69398979</ID><URL>aHR0cDovL2xvY2FsaG9zdC91cGxvYWQvZm9ydW0ucGhw</URL><RU></RU><RI>0.0.0.0</RI><HIP>127.0.0.1</HIP><UI>b99274f150d9c40d191345c6f0fe0c9d79f2cd8c0bcb4fe9a515febe3835d185</UI><S>64</S><DI>192.168.232.2</DI><Y><T>B|0|100.0000</T><T>I|0|100.0000</T><T>D|0|95.0000</T><T>P|0|100.0000|6.5000</T><T"
  38.                 ">F|2|0.0070|0.0070|0.0070</T><T>R|0|100.0000</T><T>U|2|1.0000</T><T>W|0|0.5000</T><T>H|0|100.0000</T><T>O|0|100.0000</T><T>T|0|100.0000</T><T>PP|1|100.0000</T></Y><M>NIHN</M><Fs><F><URL>aHR0cDovL2xvY2FsaG9zdC91cGxvYWQvZm9ydW0ucGhw</URL><Z>NIHN</Z><H>10410000|14|0|80000064|FC0|0,2</H><K>3a003a00</K><T>TOP</T><HIP>127.0.0.1</HIP><SC/><SH>3c7db7234f21c356</SH><NS>bG9jYWxob3N0</NS><SSL/><SSLLen/><REDIR/></F></Fs><WA/><GS/><Err/></T>",
  39.                 LAST);
  40.         lr_start_transaction("登录");


  41.         web_submit_data("member.php",
  42.                 "Action=http://localhost/upload/member.php?mod=logging&action=login&loginsubmit=yes&infloat=yes&lssubmit=yes&inajax=1",
  43.                 "Method=POST",
  44.                 "TargetFrame=",
  45.                 "RecContentType=text/xml",
  46.                 "Referer=http://localhost/upload/forum.php",
  47.                 "Snapshot=t22.inf",
  48.                 "Mode=HTML",
  49.                 ITEMDATA,
  50.                 "Name=fastloginfield", "Value=username", ENDITEM,
  51.                 "Name=username", "Value=caimei1", ENDITEM,
  52.                 "Name=password", "Value=123456", ENDITEM,
  53.                 "Name=quickforward", "Value=yes", ENDITEM,
  54.                 "Name=handlekey", "Value=ls", ENDITEM,
  55.                 LAST);

  56.        

  57.         web_url("forum.php_2",
  58.                 "URL=http://localhost/upload/forum.php",
  59.                 "TargetFrame=",
  60.                 "Resource=0",
  61.                 "RecContentType=text/html",
  62.                 "Referer=http://localhost/upload/forum.php",
  63.                 "Snapshot=t23.inf",
  64.                 "Mode=HTML",
  65.                 EXTRARES,
  66.                 "Url=static/image/common/user_online.gif", ENDITEM,
  67.                 "Url=static/image/common/style_switch.png", ENDITEM,
  68.                 "Url=../favicon.ico", "Referer=", ENDITEM,
  69.                 "Url=static/js/common_extra.js?3Qj", ENDITEM,
  70.                 "Url=static/image/common/popupcredit_bg.gif", ENDITEM,
  71.                 "Url=static/image/common/tip_bottom.png", ENDITEM,
  72.                 LAST);
  73.         lr_end_transaction("登录",LR_AUTO);

  74.         web_url("默认版块",
  75.                 "URL=http://localhost/upload/forum.php?mod=forumdisplay&fid=2",
  76.                 "TargetFrame=",
  77.                 "Resource=0",
  78.                 "RecContentType=text/html",
  79.                 "Referer=http://localhost/upload/forum.php",
  80.                 "Snapshot=t24.inf",
  81.                 "Mode=HTML",
  82.                 EXTRARES,
  83.                 "Url=static/image/common/fav.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  84.                 "Url=static/image/common/arw_r.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  85.                 "Url=static/image/common/feed.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  86.                 "Url=static/image/common/arw_l.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  87.                 "Url=static/image/common/atarget.png", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  88.                 "Url=static/image/common/refresh.png", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  89.                 LAST);

  90.         web_url("默认版块_2",
  91.                 "URL=http://localhost/upload/forum.php?mod=forumdisplay&fid=2",
  92.                 "TargetFrame=",
  93.                 "Resource=0",
  94.                 "RecContentType=text/html",
  95.                 "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2",
  96.                 "Snapshot=t25.inf",
  97.                 "Mode=HTML",
  98.                 EXTRARES,
  99.                 "Url=static/image/common/fav.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  100.                 "Url=static/image/common/feed.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  101.                 "Url=static/image/common/arw_l.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  102.                 "Url=static/image/common/atarget.png", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  103.                 "Url=static/image/common/refresh.png", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  104.                 "Url=static/image/common/titlebg_sd.png", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  105.                 "Url=static/image/editor/editor.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  106.                 "Url=static/js/smilies.js?3Qj", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  107.                 "Url=data/cache/common_smilies_var.js?3Qj", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  108.                 "Url=static/image/smiley/default/sad.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  109.                 "Url=static/image/smiley/default/smile.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  110.                 "Url=static/image/smiley/default/biggrin.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  111.                 "Url=static/image/smiley/default/cry.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  112.                 "Url=static/image/smiley/default/huffy.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  113.                 "Url=static/image/smiley/default/shocked.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  114.                 "Url=static/image/smiley/default/tongue.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  115.                 "Url=static/image/smiley/default/shy.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  116.                 "Url=static/image/smiley/default/titter.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  117.                 "Url=static/image/smiley/default/sweat.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  118.                 "Url=static/image/smiley/default/mad.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  119.                 "Url=static/image/smiley/default/lol.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  120.                 "Url=static/image/smiley/default/loveliness.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  121.                 "Url=static/image/smiley/default/funk.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  122.                 "Url=static/image/smiley/default/curse.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  123.                 "Url=static/image/smiley/default/dizzy.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  124.                 "Url=static/image/smiley/default/shutup.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  125.                 "Url=static/image/smiley/default/sleepy.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  126.                 "Url=static/image/smiley/default/hug.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  127.                 "Url=static/image/smiley/default/victory.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  128.                 "Url=static/image/smiley/default/time.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  129.                 "Url=static/image/smiley/default/kiss.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  130.                 "Url=static/image/smiley/default/handshake.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  131.                 "Url=static/image/smiley/default/call.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  132.                 "Url=static/image/common/pollsmall.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  133.                 "Url=static/image/common/folder_new.gif", "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2", ENDITEM,
  134.                 LAST);

  135.         lr_start_transaction("发帖子");
复制代码

作者: zxcqaz    时间: 2015-2-3 14:42
仰望实现 发表于 2015-2-3 13:38
你要贴代码出来,你就这样说,谁看的出来啥问题啊
  1. lr_start_transaction("发帖子");
  2. web_reg_save_param_ex(
  3.                 "ParamName=CorrelationParameter_1",
  4.                 "LB= value=\"",
  5.                 "RB=\" ",
  6.                 "Ordinal=2",
  7.                 SEARCH_FILTERS,
  8.                 "Scope=All",
  9.                 "RequestUrl=*/forum.php*",
  10.                 LAST);


  11.         web_url("高级模式",
  12.                 "URL=http://localhost/upload/forum.php?mod=post&action=newthread&fid=2",
  13.                 "TargetFrame=",
  14.                 "Resource=0",
  15.                 "RecContentType=text/html",
  16.                 "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2",
  17.                 "Snapshot=t26.inf",
  18.                 "Mode=HTML",
  19.                 EXTRARES,
  20.                 "Url=static/image/common/notice.gif", "Referer=http://localhost/upload/forum.php?mod=post&action=newthread&fid=2", ENDITEM,
  21.                 "Url=static/image/common/card_btn.png", "Referer=http://localhost/upload/forum.php?mod=post&action=newthread&fid=2", ENDITEM,
  22.                 "Url=static/image/common/newarow.gif", "Referer=http://localhost/upload/forum.php?mod=post&action=newthread&fid=2", ENDITEM,
  23.                 "Url=static/image/common/dot.gif", "Referer=http://localhost/upload/forum.php?mod=post&action=newthread&fid=2", ENDITEM,
  24.                 "Url=static/image/common/upload.swf?site=/upload/misc.php%3fmod=swfupload%26type=image%26fid=2&type=image&random=e5os", "Referer=http://localhost/upload/forum.php?mod=post&action=newthread&fid=2", ENDITEM,
  25.                 "Url=static/image/common/upload.swf?site=/upload/misc.php%3fmod=swfupload%26fid=2&random=Z4lH", "Referer=http://localhost/upload/forum.php?mod=post&action=newthread&fid=2", ENDITEM,
  26.                 LAST);

  27.         web_add_cookie("MUID=35538546BFC56F9B1119827DBBC56900; DOMAIN=iecvlist.microsoft.com");

  28.         /*web_url("iecompatviewlist.xml",
  29.                 "URL=https://iecvlist.microsoft.com/IE11/1387494476607/iecompatviewlist.xml",
  30.                 "TargetFrame=",
  31.                 "Resource=0",
  32.                 "RecContentType=text/xml",
  33.                 "Referer=",
  34.                 "Snapshot=t27.inf",
  35.                 "Mode=HTML",
  36.                 EXTRARES,
  37.                 "Url=http://localhost/upload/static/image/common/op.png", "Referer=http://localhost/upload/forum.php?mod=post&action=newthread&fid=2", ENDITEM,
  38.                 LAST);*/

  39.         web_submit_data("forum.php_3",
  40.                 "Action=http://localhost/upload/forum.php?mod=post&action=newthread&fid=2&extra=&topicsubmit=yes",
  41.                 "Method=POST",
  42.                 "TargetFrame=",
  43.                 "RecContentType=text/html",
  44.                 "Referer=http://localhost/upload/forum.php?mod=post&action=newthread&fid=2",
  45.                 "Snapshot=t28.inf",
  46.                 "Mode=HTML",
  47.                 ITEMDATA,
  48.                 "Name=formhash", "Value=254c8944", ENDITEM,
  49.                 "Name=posttime", "Value=1422840163", ENDITEM,
  50.                 "Name=wysiwyg", "Value=1", ENDITEM,
  51.                 "Name=subject", "Value=test11", ENDITEM,
  52.                 "Name=message", "Value=测试关联", ENDITEM,
  53.                 "Name=replycredit_extcredits", "Value=0", ENDITEM,
  54.                 "Name=replycredit_times", "Value=1", ENDITEM,
  55.                 "Name=replycredit_membertimes", "Value=1", ENDITEM,
  56.                 "Name=replycredit_random", "Value=100", ENDITEM,
  57.                 "Name=save", "Value=", ENDITEM,
  58.                 "Name=uploadalbum", "Value=", ENDITEM,
  59.                 "Name=newalbum", "Value=", ENDITEM,
  60.                 "Name=usesig", "Value=1", ENDITEM,
  61.                 "Name=allownoticeauthor", "Value=1", ENDITEM,
  62.                 EXTRARES,
  63.                 "Url=static/image/common/midavt_shadow.gif", "Referer=http://localhost/upload/forum.php?mod=viewthread&tid=52&extra=", ENDITEM,
  64.                 "Url=static/image/common/share_btn.png", "Referer=http://localhost/upload/forum.php?mod=viewthread&tid=52&extra=", ENDITEM,
  65.                 "Url=static/image/common/edit.gif", "Referer=http://localhost/upload/forum.php?mod=viewthread&tid=52&extra=", ENDITEM,
  66.                 "Url=static/image/common/fastreply.gif", "Referer=http://localhost/upload/forum.php?mod=viewthread&tid=52&extra=", ENDITEM,
  67.                 LAST);

  68.         lr_end_transaction("发帖子",LR_AUTO);

  69.         return 0;
  70. }
复制代码

作者: zxcqaz    时间: 2015-2-3 14:42
仰望实现 发表于 2015-2-3 13:38
你要贴代码出来,你就这样说,谁看的出来啥问题啊
  1. lr_start_transaction("发帖子");
  2. web_reg_save_param_ex(
  3.                 "ParamName=CorrelationParameter_1",
  4.                 "LB= value=\"",
  5.                 "RB=\" ",
  6.                 "Ordinal=2",
  7.                 SEARCH_FILTERS,
  8.                 "Scope=All",
  9.                 "RequestUrl=*/forum.php*",
  10.                 LAST);


  11.         web_url("高级模式",
  12.                 "URL=http://localhost/upload/forum.php?mod=post&action=newthread&fid=2",
  13.                 "TargetFrame=",
  14.                 "Resource=0",
  15.                 "RecContentType=text/html",
  16.                 "Referer=http://localhost/upload/forum.php?mod=forumdisplay&fid=2",
  17.                 "Snapshot=t26.inf",
  18.                 "Mode=HTML",
  19.                 EXTRARES,
  20.                 "Url=static/image/common/notice.gif", "Referer=http://localhost/upload/forum.php?mod=post&action=newthread&fid=2", ENDITEM,
  21.                 "Url=static/image/common/card_btn.png", "Referer=http://localhost/upload/forum.php?mod=post&action=newthread&fid=2", ENDITEM,
  22.                 "Url=static/image/common/newarow.gif", "Referer=http://localhost/upload/forum.php?mod=post&action=newthread&fid=2", ENDITEM,
  23.                 "Url=static/image/common/dot.gif", "Referer=http://localhost/upload/forum.php?mod=post&action=newthread&fid=2", ENDITEM,
  24.                 "Url=static/image/common/upload.swf?site=/upload/misc.php%3fmod=swfupload%26type=image%26fid=2&type=image&random=e5os", "Referer=http://localhost/upload/forum.php?mod=post&action=newthread&fid=2", ENDITEM,
  25.                 "Url=static/image/common/upload.swf?site=/upload/misc.php%3fmod=swfupload%26fid=2&random=Z4lH", "Referer=http://localhost/upload/forum.php?mod=post&action=newthread&fid=2", ENDITEM,
  26.                 LAST);

  27.         web_add_cookie("MUID=35538546BFC56F9B1119827DBBC56900; DOMAIN=iecvlist.microsoft.com");

  28.         /*web_url("iecompatviewlist.xml",
  29.                 "URL=https://iecvlist.microsoft.com/IE11/1387494476607/iecompatviewlist.xml",
  30.                 "TargetFrame=",
  31.                 "Resource=0",
  32.                 "RecContentType=text/xml",
  33.                 "Referer=",
  34.                 "Snapshot=t27.inf",
  35.                 "Mode=HTML",
  36.                 EXTRARES,
  37.                 "Url=http://localhost/upload/static/image/common/op.png", "Referer=http://localhost/upload/forum.php?mod=post&action=newthread&fid=2", ENDITEM,
  38.                 LAST);*/

  39.         web_submit_data("forum.php_3",
  40.                 "Action=http://localhost/upload/forum.php?mod=post&action=newthread&fid=2&extra=&topicsubmit=yes",
  41.                 "Method=POST",
  42.                 "TargetFrame=",
  43.                 "RecContentType=text/html",
  44.                 "Referer=http://localhost/upload/forum.php?mod=post&action=newthread&fid=2",
  45.                 "Snapshot=t28.inf",
  46.                 "Mode=HTML",
  47.                 ITEMDATA,
  48.                 "Name=formhash", "Value=254c8944", ENDITEM,
  49.                 "Name=posttime", "Value=1422840163", ENDITEM,
  50.                 "Name=wysiwyg", "Value=1", ENDITEM,
  51.                 "Name=subject", "Value=test11", ENDITEM,
  52.                 "Name=message", "Value=测试关联", ENDITEM,
  53.                 "Name=replycredit_extcredits", "Value=0", ENDITEM,
  54.                 "Name=replycredit_times", "Value=1", ENDITEM,
  55.                 "Name=replycredit_membertimes", "Value=1", ENDITEM,
  56.                 "Name=replycredit_random", "Value=100", ENDITEM,
  57.                 "Name=save", "Value=", ENDITEM,
  58.                 "Name=uploadalbum", "Value=", ENDITEM,
  59.                 "Name=newalbum", "Value=", ENDITEM,
  60.                 "Name=usesig", "Value=1", ENDITEM,
  61.                 "Name=allownoticeauthor", "Value=1", ENDITEM,
  62.                 EXTRARES,
  63.                 "Url=static/image/common/midavt_shadow.gif", "Referer=http://localhost/upload/forum.php?mod=viewthread&tid=52&extra=", ENDITEM,
  64.                 "Url=static/image/common/share_btn.png", "Referer=http://localhost/upload/forum.php?mod=viewthread&tid=52&extra=", ENDITEM,
  65.                 "Url=static/image/common/edit.gif", "Referer=http://localhost/upload/forum.php?mod=viewthread&tid=52&extra=", ENDITEM,
  66.                 "Url=static/image/common/fastreply.gif", "Referer=http://localhost/upload/forum.php?mod=viewthread&tid=52&extra=", ENDITEM,
  67.                 LAST);

  68.         lr_end_transaction("发帖子",LR_AUTO);

  69.         return 0;
  70. }
复制代码

作者: zxcqaz    时间: 2015-2-3 14:43
仰望实现 发表于 2015-2-3 13:38
你要贴代码出来,你就这样说,谁看的出来啥问题啊

以上是代码,我对比了登录部分的代码,两次录制的没什么不一样,发帖部分的我已经做了关联,麻烦帮忙看一下,该怎么处理,部分cookie的代码删掉了。谢谢
作者: saharaqs    时间: 2015-2-6 13:34
你关联的CorrelationParameter_1这个参数替换到哪里了?




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