ITPub博客

首页 > 应用开发 > IT综合 > 【性能测试】LoadRunner 测试之关联

【性能测试】LoadRunner 测试之关联

原创 IT综合 作者:berlits 时间:2015-09-07 00:37:52 12 删除 编辑

原创作品,谢绝转载

1.1   关联概述

1.1.1    什么是关联

关联是LoadRunner测试的一种重要的思想。 当利用VuGen进行录制脚本时,实际是通过监听客户端(client)和服务端(server)之间的通信实现的。客户端发送请求,包括通信的用户、内容、日期给服务端,服务端返回处理等等结果。每一次通信为一次会话。这种会话只在当时client跟服务端通信时才有效。由于VuGen录制脚本都是事后的,因此当使用录制的脚本模拟当初的通信动作时,由于会话已经过期,因此这时就会失败。为了解决这个问题。就需要把这种会话的关键值获取到,设置为一种动态获取,使得服务器每一都认为这个会话是有效的。这就是关联的思想。

通过关联,使得动态数据的获取得到了解决。同时,通过将数据参数化,减少了代码量,使得代码更加简洁高效。

1.1.2    关联的两个特点

获取的值必须是动态的。比如会话的ID,客户端和服务器每一次通信产生一个会话ID,这个ID是唯一的,每一次都不一样。这个值就是一个动态的值。

关联的值必须是从服务器返回的。从客户端发送请求到服务端,服务端必须返回结果,这才是一次成功的会话,这时才会产生一个会话ID。

1.2   关联方法

1.2.1    自动关联

自动关联的方法比较简单

录制脚本。以登录webtour为例。过程略

录制的代码如下

 

点击(此处)折叠或打开

  1. Action()
  2. {

  3. //Correlation comment - Do not change!Original value='116743.537707574zAAtQQfpHcAiDDDDDzAcQpQHtDcf' Name ='CorrelationParameter_1'

  4.     web_reg_save_param_ex(
  5.         "ParamName=CorrelationParameter_1",
  6.         "LB=userSession value=",
  7.         "RB=>\n<table border",
  8.         SEARCH_FILTERS,
  9.         "Scope=All",
  10.         "RequestUrl=*/nav.pl*",
  11.         LAST);

  12. //Correlation comment - Do not change!Original value='116743.537707574zAAtQQfpHcAiDDDDDzAcQpQHtDcf' Name ='CorrelationParameter_2'

  13.     web_reg_save_param_ex(
  14.         "ParamName=CorrelationParameter_2",
  15.         "LB=userSession value=",
  16.         "RB=>\n<table border",
  17.         SEARCH_FILTERS,
  18.         "Scope=All",
  19.         "RequestUrl=*/nav.pl*",
  20.         LAST);

  21.     web_url("WebTours",
  22.         "URL=http://127.0.0.1:1080/WebTours/",
  23.         "TargetFrame=",
  24.         "Resource=0",
  25.         "RecContentType=text/html",
  26.         "Referer=",
  27.         "Snapshot=t1.inf",
  28.         "Mode=HTML",
  29.         LAST);

  30.     web_custom_request("s.x.baidu.com",
  31.         "URL=http://s.x.baidu.com/",
  32.         "Method=POST",
  33.         "TargetFrame=",
  34.         "Resource=0",
  35.         "RecContentType=application/octet-stream",
  36.         "Referer=",
  37.         "Snapshot=t2.inf",
  38.         "Mode=HTML",
  39.         "EncType=application/octet-stream",
  40.         "BodyBinary=\\x00\\x00\\x00A\\x00\\x00\\x08\\x0B\\x10\\x01\\x18\\x00\" eb8e0f0d521396106a88e2e50eac0a70(\\xFF箑\\x80\\x80\\x80纮\\x042\\x008\\x02@\\x00H\\x06P\\x01X鬘` \\x00\\x00\\x00\\x00\\x00\\x00",
  41.         LAST);

  42.     web_custom_request("s.x.baidu.com_2",
  43.         "URL=http://s.x.baidu.com/",
  44.         "Method=POST",
  45.         "TargetFrame=",
  46.         "Resource=0",
  47.         "RecContentType=application/octet-stream",
  48.         "Referer=",
  49.         "Snapshot=t3.inf",
  50.         "Mode=HTML",
  51.         "EncType=application/octet-stream",
  52.         "BodyBinary=\\x00\\x00\\x00y\\x00\\x00\\x08\\x0B\\x10\\x01\\x18\\x00\" eb8e0f0d521396106a88e2e50eac0a70(\\xFF箑\\x80\\x80\\x80纮\\x0428\\xE1\\x02A痧<y`'?\\x0C惪\\xAA\\x15{\\xB9\\x18-\\x89!糩轔}\\x12^═M]⑧\\xCE<p瘃\\x8F\\x108\\xA4;7\\x06\\x13*\\xB0\\x1Bk28韪8\\x02@\\x00H\\x06P\\x01X鬘` \\x00\\x00\\x000\\x00\\x00妀郢y?唤a\\xE2$愘\\xC8>魷j\\x12\\xF3\\x13∥;'帕糞翼\\x84\\x17澼~\\xB7\\x01?眤\\xD2\\xFF\\x07挟",
  53.         LAST);

  54.     lr_think_time(5);

  55.     web_submit_data("login.pl",
  56.         "Action=http://127.0.0.1:1080/WebTours/login.pl",
  57.         "Method=POST",
  58.         "TargetFrame=",
  59.         "RecContentType=text/html",
  60.         "Referer=http://127.0.0.1:1080/WebTours/nav.pl?in=home",
  61.         "Snapshot=t4.inf",
  62.         "Mode=HTML",
  63.         ITEMDATA,
  64.         "Name=userSession", "Value={CorrelationParameter_2}", ENDITEM,
  65.         "Name=username", "Value=admin", ENDITEM,
  66.         "Name=password", "Value=123456", ENDITEM,
  67.         "Name=JSFormSubmit", "Value=on", ENDITEM,
  68.         "Name=login.x", "Value=22", ENDITEM,
  69.         "Name=login.y", "Value=10", ENDITEM,
  70.         LAST);

  71. return 0;
  72. }


CTRL+F8,此时提示需要先回放脚本。点击run script

 

回放完成,再次按下Ctrl+F8,进入Tree视图。系统提示如下信息,点击YES

 

扫描完成后,可以在脚本下方correlation result检查看到的结果。如下图所示。扫描的出结果为5423248 ,扫描出的是字符串中部分值。关联时,要将整个字符串进行关联,而不是部分。需要关联的字符串为116765.295423248zAAzVVtpiiDDDDDDDzADzpziQD

 

 

 

 

 

点击左边的correlation即可完成关联

通常要把所有需要做关联的数据都找出来。前面的关联没有做好,会影响到后面的内容。

1.2.2    手工关联

工具再智能,也不如人智能。同样的,学习性能测试,眼光不能局限于一个工具。重要的是深入学习的是测试与工具设计的思想,以不变应万变。

相比较自动关联,手工关联则要准确灵活的多。这是要重点掌握的内容。

通用的流程如下

1、录制两份完全一致的脚本,注意是完全一样的,这表示输入的所有参数都是一致的。

2、使用LoadRunner自带的WinDiff工具比较两份脚本的差异。找到关键的差异点。

3、编写关联函数。

下面以创建和解决bugfree case为例介绍手工关联方法

 

第一步、录制两份完全一致的脚本。过程略。代码如下

第二步、通过如下任一方法找出关联值

方法1:使用winDiff 找出差异。Tools->compare with script。从比较的结果。如下的ID是一个明显的差异。其他都可以忽略,如think time之类的。仔细研究这个ID值发现,这是bug的ID值,是唯一的。同时从服务器返回的。每个case的ID值都不一样。需要做关联。

 

 

方法2:使用lr response查找

1)在脚本界面,点击左上角的Tree ,HTTP-VIEW。

2)由于做的是创建和解决bug的业务,因此可以预计创建的bug和解决的bug 必需一致。所以应该重点搜创建和解决bug这两个业务下的代码。经过检查,在response栏里找到了如下两个关键的值。XXXX/bug/4 和XXXX/bug/4/resolved。经过分析这个值4,就是bug的ID。是个bug的唯一键值。

 

 

 

方法3:通过IE F12 调试功能按键,查找关键字。如下图所示。

 

第三步、创建关联函数

这个函数比较简单,可以查下联机文档。这里直接写出来

注意到上面出现两类关联值。

Action.c(27):     d><td class="title"><span class="title"><a href="/bugfree/index.php/bug/4" target="_blank"

Action.c(134):     firm = false;location.href=&quot;/bugfree/index.php/bug/4/resolved_edit&quot;" class="btn"

Action.c(191): Error -26631: HTTP Status-Code=400 (Bad Request) for "http://192.168.0.100/bugfree/index.php/search/getPreNextId?id=4&type=bug&product_id=1"

注意看这两个值的左右边界是不一样的。因此这里需要做两个关联函数。

       web_reg_save_param("BUGID1",

              "LB=/bug/",

              "RB=",

              LAST);

       lr_output_message("BUGID1的值是%d","{BUGID1}");

 

       web_reg_save_param("BUGID2",

              "LB=/bug/",

              "RB=",

              LAST);

       lr_output_message("BUGID2的值是%d","{BUGID2}");

完整脚本


点击(此处)折叠或打开

  1. Action()
  2. {

  3.     web_add_cookie("1_product=9eb104cd00a9d6a393eb08ebacb5c5a037163480s%3A1%3A%221%22%3B; DOMAIN=192.168.0.100");

  4.     web_add_cookie("pageSize=53dc3588e660b6b16975b6e0474a2401f9a1f7bas%3A2%3A%2220%22%3B; DOMAIN=192.168.0.100");

  5.     web_add_cookie("ac-cookie=%5B%7B%22data%22%3A%5B%22%E7%B3%BB%E7%BB%9F%E7%AE%A1%E7%90%86%E5%91%98%22%2C%22%E7%B3%BB%E7%BB%9F%E7%AE%A1%E7%90%86%E5%91%98%5Badmin%5D%22%5D%2C%22value%22%3A%22%E7%B3%BB%E7%BB%9F%E7%AE%A1%E7%90%86%E5%91%98%22%2C%22result%22%3A%22%E7%B3%BB%E7%BB%9F%E7%AE%A1%E7%90%86%E5%91%98%22%7D%5D; DOMAIN=192.168.0.100");

  6.     web_add_cookie("language=1f54bcb747776c1d17a4277c793d67ca34353faes%3A5%3A%22zh_cn%22%3B; DOMAIN=192.168.0.100");

  7.     web_url("login",
  8.         "URL=http://192.168.0.100/bugfree/index.php/site/login",
  9.         "TargetFrame=",
  10.         "Resource=0",
  11.         "RecContentType=text/html",
  12.         "Referer=",
  13.         "Snapshot=t70.inf",
  14.         "Mode=HTML",
  15.         EXTRARES,
  16.         "URL=/bugfree/themes/classic/assets/images/blue/seperate_line.png", ENDITEM,
  17.         "URL=/bugfree/themes/classic/assets/images/blue/logo_login.png", ENDITEM,
  18.         LAST);

  19.     lr_start_transaction("登录");
  20.     
  21.     web_submit_data("login_2",
  22.         "Action=http://192.168.0.100/bugfree/index.php/site/login",
  23.         "Method=POST",
  24.         "TargetFrame=",
  25.         "RecContentType=text/html",
  26.         "Referer=http://192.168.0.100/bugfree/index.php/site/login",
  27.         "Snapshot=t71.inf",
  28.         "Mode=HTML",
  29.         ITEMDATA,
  30.         "Name=LoginForm[username]", "Value=admin", ENDITEM,
  31.         "Name=LoginForm[password]", "Value=123456", ENDITEM,
  32.         "Name=LoginForm[language]", "Value=zh_cn", ENDITEM,
  33.         "Name=LoginForm[rememberMe]", "Value=0", ENDITEM,
  34.         EXTRARES,
  35.         "URL=/bugfree/themes/classic/assets/images/active.png", "Referer=http://192.168.0.100/bugfree/index.php/bug/list/1", ENDITEM,
  36.         "URL=/bugfree/themes/classic/assets/images/resolved.png", "Referer=http://192.168.0.100/bugfree/index.php/bug/list/1", ENDITEM,
  37.         "URL=/bugfree/themes/classic/assets/images/down.gif", "Referer=http://192.168.0.100/bugfree/index.php/bug/list/1", ENDITEM,
  38.         "URL=/bugfree/assets/bceb9043/jui/css/base/images/ui-bg_flat_75_ffffff_40x100.png", "Referer=http://192.168.0.100/bugfree/index.php/bug/list/1", ENDITEM,
  39.         "URL=/bugfree/assets/627dec5d/img/page.gif", "Referer=http://192.168.0.100/bugfree/index.php/bug/list/1", ENDITEM,
  40.         "URL=/bugfree/assets/bceb9043/jui/css/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png", "Referer=http://192.168.0.100/bugfree/index.php/bug/list/1", ENDITEM,
  41.         "URL=/bugfree/assets/bceb9043/jui/css/base/images/ui-icons_222222_256x240.png", "Referer=http://192.168.0.100/bugfree/index.php/bug/list/1", ENDITEM,
  42.         LAST);

  43.     web_submit_data("getProductModule",
  44.         "Action=http://192.168.0.100/bugfree/index.php/search/getProductModule",
  45.         "Method=POST",
  46.         "TargetFrame=",
  47.         "RecContentType=text/html",
  48.         "Referer=http://192.168.0.100/bugfree/index.php/bug/list/1",
  49.         "Snapshot=t72.inf",
  50.         "Mode=HTML",
  51.         ITEMDATA,
  52.         "Name=product_id", "Value=1", ENDITEM,
  53.         "Name=productmodule_id", "Value=0", ENDITEM,
  54.         LAST);

  55.     lr_end_transaction("登录", LR_AUTO);

  56.     lr_start_transaction("新建case");

  57.     lr_think_time(13);

  58.     web_url("edit",
  59.         "URL=http://192.168.0.100/bugfree/index.php/info/edit?type=bug&action=opened&product_id=1",
  60.         "TargetFrame=",
  61.         "Resource=0",
  62.         "RecContentType=text/html",
  63.         "Referer=http://192.168.0.100/bugfree/index.php/bug/list/1",
  64.         "Snapshot=t73.inf",
  65.         "Mode=HTML",
  66.         EXTRARES,
  67.         "URL=/bugfree/assets/5839844b/themes/default/default.css", "Referer=http://192.168.0.100/bugfree/index.php/info/edit?type=bug&action=opened&product_id=1", ENDITEM,
  68.         "URL=/bugfree/assets/5839844b/themes/default/default.png", "Referer=http://192.168.0.100/bugfree/index.php/info/edit?type=bug&action=opened&product_id=1", ENDITEM,
  69.         "URL=/bugfree/assets/31570e3b/indicator.gif", "Referer=http://192.168.0.100/bugfree/index.php/info/edit?type=bug&action=opened&product_id=1", ENDITEM,
  70.         LAST);

  71.     lr_think_time(35);

  72.     web_reg_find("Search=All",
  73.         "TextPfx=/bug/",
  74.         "TextSfx=\"",
  75.         LAST);
  76. //Correlation comment - Do not change!Original value='4' Name ='CorrelationParameter_1'

  77.     web_reg_save_param(
  78.         "CorrelationParameter_1",
  79.         "LB=bug/",
  80.         "RB=';</script",
  81.         "Ordinal=5",
  82.         SEARCH_FILTERS,
  83.         "Scope=All",
  84.         "RequestUrl=*/edit*",
  85.         LAST);

  86.     web_submit_data("edit_2",
  87.         "Action=http://192.168.0.100/bugfree/index.php/info/edit?type=bug&action=opened&product_id=1",
  88.         "Method=POST",
  89.         "EncType=multipart/form-data",
  90.         "TargetFrame=",
  91.         "RecContentType=text/html",
  92.         "Referer=http://192.168.0.100/bugfree/index.php/info/edit?type=bug&action=opened&product_id=1",
  93.         "Snapshot=t74.inf",
  94.         "Mode=HTML",
  95.         ITEMDATA,
  96.         "Name=BugInfoView[deleted_file_id]", "Value=", ENDITEM,
  97.         "Name=BugInfoView[lock_version]", "Value=", ENDITEM,
  98.         "Name=BugInfoView[product_id]", "Value=1", ENDITEM,
  99.         "Name=isPageDirty", "Value=1", ENDITEM,
  100.         "Name=templateTitle", "Value=", ENDITEM,
  101.         "Name=BugInfoView[title]", "Value=case03", ENDITEM,
  102.         "Name=layer1_module", "Value=0", ENDITEM,
  103.         "Name=BugInfoView[productmodule_id]", "Value=0", ENDITEM,
  104.         "Name=BugInfoView[assign_to_name]", "Value=系统管理员", ENDITEM,
  105.         "Name=BugInfoView[mail_to]", "Value=", ENDITEM,
  106.         "Name=BugInfoView[severity]", "Value=1", ENDITEM,
  107.         "Name=BugInfoView[priority]", "Value=1", ENDITEM,
  108.         "Name=Custom[BugType]", "Value=用户界面", ENDITEM,
  109.         "Name=Custom[HowFound]", "Value=功能测试", ENDITEM,
  110.         "Name=Custom[BugOS]", "Value=Windows 7", ENDITEM,
  111.         "Name=Custom[BugBrowser]", "Value=IE 8.0", ENDITEM,
  112.         "Name=Custom[OpenedBuild]", "Value=B001", ENDITEM,
  113.         "Name=Custom[ResolvedBuild]", "Value=", ENDITEM,
  114.         "Name=Custom[BugSubStatus]", "Value=", ENDITEM,
  115.         "Name=Custom[BugMachine]", "Value=", ENDITEM,
  116.         "Name=Custom[BugKeyword]", "Value=", ENDITEM,
  117.         "Name=BugInfoView[related_bug]", "Value=", ENDITEM,
  118.         "Name=BugInfoView[related_case]", "Value=", ENDITEM,
  119.         "Name=BugInfoView[related_result]", "Value=", ENDITEM,
  120.         "Name=attachment_file[]", "Value=", "File=yes", ENDITEM,
  121.         "Name=BugInfoView[action_note]", "Value=登录失败", ENDITEM,
  122.         "Name=BugInfoView[repeat_step]", "Value=[步骤]<br />\r\n"
  123.         "1.登录<br />\r\n"
  124.         "2.<br />\r\n"
  125.         "<br />\r\n"
  126.         "[结果]<br />\r\n"
  127.         "&nbsp;登录失败<br />\r\n"
  128.         "[期望]<br />\r\n"
  129.         "&nbsp;登录成功<br />\r\n"
  130.         "[备注]<br />\r\n"
  131.         "<br />", ENDITEM,
  132.         LAST);

  133.     web_url("BugFree",
  134.         "URL=http://192.168.0.100/bugfree/index.php/bug/list/1",
  135.         "TargetFrame=",
  136.         "Resource=0",
  137.         "RecContentType=text/html",
  138.         "Referer=http://192.168.0.100/bugfree/index.php/info/edit?type=bug&action=opened&product_id=1",
  139.         "Snapshot=t75.inf",
  140.         "Mode=HTML",
  141.         LAST);

  142.     web_url("case03",
  143.         "URL=http://192.168.0.100/bugfree/index.php/bug/{CorrelationParameter_1}",
  144.         "TargetFrame=_blank",
  145.         "Resource=0",
  146.         "RecContentType=text/html",
  147.         "Referer=http://192.168.0.100/bugfree/index.php/info/edit?type=bug&action=opened&product_id=1",
  148.         "Snapshot=t76.inf",
  149.         "Mode=HTML",
  150.         LAST);

  151.     web_custom_request("s.x.baidu.com",
  152.         "URL=http://s.x.baidu.com/",
  153.         "Method=POST",
  154.         "TargetFrame=",
  155.         "Resource=0",
  156.         "RecContentType=application/octet-stream",
  157.         "Referer=",
  158.         "Snapshot=t77.inf",
  159.         "Mode=HTML",
  160.         "EncType=application/octet-stream",
  161.         "BodyBinary=\\x00\\x00\\x00A\\x00\\x00\\x08\\x0B\\x10\\x01\\x18\\x00\" eb8e0f0d521396106a88e2e50eac0a70(\\xFF箑\\x80\\x80\\x80纮\\x042\\x008\\x02@\\x00H\\x06P\\x01X鬘` \\x00\\x00\\x00\\x00\\x00\\x00",
  162.         LAST);

  163.     web_submit_data("getProductModule_2",
  164.         "Action=http://192.168.0.100/bugfree/index.php/search/getProductModule",
  165.         "Method=POST",
  166.         "TargetFrame=",
  167.         "RecContentType=text/html",
  168.         "Referer=http://192.168.0.100/bugfree/index.php/bug/list/1",
  169.         "Snapshot=t78.inf",
  170.         "Mode=HTML",
  171.         ITEMDATA,
  172.         "Name=product_id", "Value=1", ENDITEM,
  173.         "Name=productmodule_id", "Value=0", ENDITEM,
  174.         LAST);

  175.     web_url("getPreNextId",
  176.         "URL=http://192.168.0.100/bugfree/index.php/search/getPreNextId?id={CorrelationParameter_1}&type=bug&product_id=1",
  177.         "TargetFrame=",
  178.         "Resource=0",
  179.         "RecContentType=text/html",
  180.         "Referer=http://192.168.0.100/bugfree/index.php/bug/{CorrelationParameter_1}",
  181.         "Snapshot=t79.inf",
  182.         "Mode=HTML",
  183.         LAST);

  184.     web_custom_request("s.x.baidu.com_2",
  185.         "URL=http://s.x.baidu.com/",
  186.         "Method=POST",
  187.         "TargetFrame=",
  188.         "Resource=0",
  189.         "RecContentType=application/octet-stream",
  190.         "Referer=",
  191.         "Snapshot=t80.inf",
  192.         "Mode=HTML",
  193.         "EncType=application/octet-stream",
  194.         "BodyBinary=\\x00\\x00\\x00y\\x00\\x00\\x08\\x0B\\x10\\x01\\x18\\x00\" eb8e0f0d521396106a88e2e50eac0a70(\\xFF箑\\x80\\x80\\x80纮\\x04285袸暘\\x13m灌\\x15L鞋7洺q2XX8在z\\xF4\\x0E厞O勫?5{亽8'2\n"
  195.         "螳k\\x80钖H,~箦\\x1C\\x16u78\\x02@\\x00H\\x06P\\x01X鬘` \\x00\\x00\\x00@\\x00\\x00h\\x03?C}獽\\xC6\\x05l%zpZ\\xDD/荎\\xE5\\x1AG;慟\\xFC+篻r嬫造鄹]\\x17\\x0B$\\xFFEc訆蔪縋l8kH叓9炘鮶\\x0E圥\\xA3",
  196.         LAST);

  197.     lr_end_transaction("新建case", LR_AUTO);

  198.     lr_think_time(8);

  199.     web_url("4",
  200.         "URL=http://192.168.0.100/bugfree/index.php/bug/{CorrelationParameter_1}",
  201.         "TargetFrame=",
  202.         "Resource=0",
  203.         "RecContentType=text/html",
  204.         "Referer=http://192.168.0.100/bugfree/index.php/bug/list/1",
  205.         "Snapshot=t81.inf",
  206.         "Mode=HTML",
  207.         LAST);

  208.     web_url("getPreNextId_2",
  209.         "URL=http://192.168.0.100/bugfree/index.php/search/getPreNextId?id={CorrelationParameter_1}&type=bug&product_id=1",
  210.         "TargetFrame=",
  211.         "Resource=0",
  212.         "RecContentType=text/html",
  213.         "Referer=http://192.168.0.100/bugfree/index.php/bug/{CorrelationParameter_1}",
  214.         "Snapshot=t82.inf",
  215.         "Mode=HTML",
  216.         LAST);

  217.     lr_start_transaction("解决case");

  218.     lr_think_time(10);

  219.     web_custom_request("s.x.baidu.com_3",
  220.         "URL=http://s.x.baidu.com/",
  221.         "Method=POST",
  222.         "TargetFrame=",
  223.         "Resource=0",
  224.         "RecContentType=application/octet-stream",
  225.         "Referer=",
  226.         "Snapshot=t83.inf",
  227.         "Mode=HTML",
  228.         "EncType=application/octet-stream",
  229.         "BodyBinary=\\x00\\x00\\x00y\\x00\\x00\\x08\\x0B\\x10\\x01\\x18\\x01\" eb8e0f0d521396106a88e2e50eac0a70(\\xFF箑\\x80\\x80\\x80纮\\x04285袸暘\\x13m灌\\x15L鞋7洺q2XX8在z\\xF4\\x0E厞O勫?5{亽8'2\n"
  230.         "螳k\\x80钖H,~箦\\x1C\\x16u78\\x02@\\x00H\\x06P\\x01X鬘` \\x00\\x00\\x00H\\x00\\x00誠拖鵪\\x17避?\\x97\\xFFi熓\\x14锋v_襲|~锝坩t菎\\x1C\\x91,Z?\\x80⑷蕷\\xF048\\xAF\\x14軗s嫃\\x07%药2B\\xB0\\x1Af\\x04DdA\\xE2\\x0C泧幺",
  231.         LAST);

  232.     web_url("resolved",
  233.         "URL=http://192.168.0.100/bugfree/index.php/bug/{CorrelationParameter_1}/resolved",
  234.         "TargetFrame=",
  235.         "Resource=0",
  236.         "RecContentType=text/html",
  237.         "Referer=http://192.168.0.100/bugfree/index.php/bug/{CorrelationParameter_1}",
  238.         "Snapshot=t84.inf",
  239.         "Mode=HTML",
  240.         LAST);

  241.     lr_think_time(17);

  242.     web_submit_data("resolved_2",
  243.         "Action=http://192.168.0.100/bugfree/index.php/bug/{CorrelationParameter_1}/resolved",
  244.         "Method=POST",
  245.         "EncType=multipart/form-data",
  246.         "TargetFrame=",
  247.         "RecContentType=text/html",
  248.         "Referer=http://192.168.0.100/bugfree/index.php/bug/{CorrelationParameter_1}/resolved",
  249.         "Snapshot=t85.inf",
  250.         "Mode=HTML",
  251.         ITEMDATA,
  252.         "Name=BugInfoView[deleted_file_id]", "Value=", ENDITEM,
  253.         "Name=BugInfoView[lock_version]", "Value=1", ENDITEM,
  254.         "Name=BugInfoView[product_id]", "Value=1", ENDITEM,
  255.         "Name=isPageDirty", "Value=1", ENDITEM,
  256.         "Name=templateTitle", "Value=", ENDITEM,
  257.         "Name=BugInfoView[title]", "Value=case03", ENDITEM,
  258.         "Name=layer1_module", "Value=0", ENDITEM,
  259.         "Name=BugInfoView[productmodule_id]", "Value=0", ENDITEM,
  260.         "Name=BugInfoView[assign_to_name]", "Value=系统管理员", ENDITEM,
  261.         "Name=BugInfoView[mail_to]", "Value=", ENDITEM,
  262.         "Name=BugInfoView[severity]", "Value=1", ENDITEM,
  263.         "Name=BugInfoView[priority]", "Value=1", ENDITEM,
  264.         "Name=Custom[BugType]", "Value=用户界面", ENDITEM,
  265.         "Name=Custom[HowFound]", "Value=功能测试", ENDITEM,
  266.         "Name=Custom[BugOS]", "Value=Windows 7", ENDITEM,
  267.         "Name=Custom[BugBrowser]", "Value=IE 8.0", ENDITEM,
  268.         "Name=Custom[OpenedBuild]", "Value=B001", ENDITEM,
  269.         "Name=Custom[ResolvedBuild]", "Value=B002", ENDITEM,
  270.         "Name=BugInfoView[solution]", "Value=Fixed", ENDITEM,
  271.         "Name=BugInfoView[duplicate_id]", "Value=", ENDITEM,
  272.         "Name=Custom[BugSubStatus]", "Value=", ENDITEM,
  273.         "Name=Custom[BugMachine]", "Value=", ENDITEM,
  274.         "Name=Custom[BugKeyword]", "Value=", ENDITEM,
  275.         "Name=BugInfoView[related_bug]", "Value=", ENDITEM,
  276.         "Name=BugInfoView[related_case]", "Value=", ENDITEM,
  277.         "Name=BugInfoView[related_result]", "Value=", ENDITEM,
  278.         "Name=attachment_file[]", "Value=", "File=yes", ENDITEM,
  279.         "Name=BugInfoView[action_note]", "Value=已解决", ENDITEM,
  280.         "Name=BugInfoView[repeat_step]", "Value=[步骤]<br />\r\n"
  281.         "1.登录<br />\r\n"
  282.         "2.<br />\r\n"
  283.         "<br />\r\n"
  284.         "[结果]<br />\r\n"
  285.         "&nbsp;登录失败<br />\r\n"
  286.         "[期望]<br />\r\n"
  287.         "&nbsp;登录成功<br />\r\n"
  288.         "[备注]<br />\r\n"
  289.         "<br />", ENDITEM,
  290.         LAST);

  291.     web_url("BugFree_2",
  292.         "URL=http://192.168.0.100/bugfree/index.php/bug/list/1",
  293.         "TargetFrame=",
  294.         "Resource=0",
  295.         "RecContentType=text/html",
  296.         "Referer=http://192.168.0.100/bugfree/index.php/bug/{CorrelationParameter_1}/resolved",
  297.         "Snapshot=t86.inf",
  298.         "Mode=HTML",
  299.         LAST);

  300.     web_url("case03_2",
  301.         "URL=http://192.168.0.100/bugfree/index.php/bug/{CorrelationParameter_1}",
  302.         "TargetFrame=_blank",
  303.         "Resource=0",
  304.         "RecContentType=text/html",
  305.         "Referer=http://192.168.0.100/bugfree/index.php/bug/{CorrelationParameter_1}/resolved",
  306.         "Snapshot=t87.inf",
  307.         "Mode=HTML",
  308.         LAST);

  309.     web_submit_data("getProductModule_3",
  310.         "Action=http://192.168.0.100/bugfree/index.php/search/getProductModule",
  311.         "Method=POST",
  312.         "TargetFrame=",
  313.         "RecContentType=text/html",
  314.         "Referer=http://192.168.0.100/bugfree/index.php/bug/list/1",
  315.         "Snapshot=t88.inf",
  316.         "Mode=HTML",
  317.         ITEMDATA,
  318.         "Name=product_id", "Value=1", ENDITEM,
  319.         "Name=productmodule_id", "Value=0", ENDITEM,
  320.         LAST);

  321.     web_url("getPreNextId_3",
  322.         "URL=http://192.168.0.100/bugfree/index.php/search/getPreNextId?id={CorrelationParameter_1}&type=bug&product_id=1",
  323.         "TargetFrame=",
  324.         "Resource=0",
  325.         "RecContentType=text/html",
  326.         "Referer=http://192.168.0.100/bugfree/index.php/bug/{CorrelationParameter_1}",
  327.         "Snapshot=t89.inf",
  328.         "Mode=HTML",
  329.         LAST);

  330.     lr_end_transaction("解决case", LR_AUTO);

  331. return 0;
  332. }


点击(此处)折叠或打开

  1. Action()
  2. {

  3.     web_add_cookie("1_product=9eb104cd00a9d6a393eb08ebacb5c5a037163480s%3A1%3A%221%22%3B; DOMAIN=192.168.0.100");

  4.     web_add_cookie("pageSize=53dc3588e660b6b16975b6e0474a2401f9a1f7bas%3A2%3A%2220%22%3B; DOMAIN=192.168.0.100");

  5.     web_add_cookie("ac-cookie=%5B%7B%22data%22%3A%5B%22%E7%B3%BB%E7%BB%9F%E7%AE%A1%E7%90%86%E5%91%98%22%2C%22%E7%B3%BB%E7%BB%9F%E7%AE%A1%E7%90%86%E5%91%98%5Badmin%5D%22%5D%2C%22value%22%3A%22%E7%B3%BB%E7%BB%9F%E7%AE%A1%E7%90%86%E5%91%98%22%2C%22result%22%3A%22%E7%B3%BB%E7%BB%9F%E7%AE%A1%E7%90%86%E5%91%98%22%7D%5D; DOMAIN=192.168.0.100");

  6.     web_add_cookie("language=1f54bcb747776c1d17a4277c793d67ca34353faes%3A5%3A%22zh_cn%22%3B; DOMAIN=192.168.0.100");

  7.     web_url("login",
  8.         "URL=http://192.168.0.100/bugfree/index.php/site/login",
  9.         "TargetFrame=",
  10.         "Resource=0",
  11.         "RecContentType=text/html",
  12.         "Referer=",
  13.         "Snapshot=t70.inf",
  14.         "Mode=HTML",
  15.         EXTRARES,
  16.         "URL=/bugfree/themes/classic/assets/images/blue/seperate_line.png", ENDITEM,
  17.         "URL=/bugfree/themes/classic/assets/images/blue/logo_login.png", ENDITEM,
  18.         LAST);

  19.     lr_start_transaction("登录");
  20.     
  21.     web_submit_data("login_2",
  22.         "Action=http://192.168.0.100/bugfree/index.php/site/login",
  23.         "Method=POST",
  24.         "TargetFrame=",
  25.         "RecContentType=text/html",
  26.         "Referer=http://192.168.0.100/bugfree/index.php/site/login",
  27.         "Snapshot=t71.inf",
  28.         "Mode=HTML",
  29.         ITEMDATA,
  30.         "Name=LoginForm[username]", "Value=admin", ENDITEM,
  31.         "Name=LoginForm[password]", "Value=123456", ENDITEM,
  32.         "Name=LoginForm[language]", "Value=zh_cn", ENDITEM,
  33.         "Name=LoginForm[rememberMe]", "Value=0", ENDITEM,
  34.         EXTRARES,
  35.         "URL=/bugfree/themes/classic/assets/images/active.png", "Referer=http://192.168.0.100/bugfree/index.php/bug/list/1", ENDITEM,
  36.         "URL=/bugfree/themes/classic/assets/images/resolved.png", "Referer=http://192.168.0.100/bugfree/index.php/bug/list/1", ENDITEM,
  37.         "URL=/bugfree/themes/classic/assets/images/down.gif", "Referer=http://192.168.0.100/bugfree/index.php/bug/list/1", ENDITEM,
  38.         "URL=/bugfree/assets/bceb9043/jui/css/base/images/ui-bg_flat_75_ffffff_40x100.png", "Referer=http://192.168.0.100/bugfree/index.php/bug/list/1", ENDITEM,
  39.         "URL=/bugfree/assets/627dec5d/img/page.gif", "Referer=http://192.168.0.100/bugfree/index.php/bug/list/1", ENDITEM,
  40.         "URL=/bugfree/assets/bceb9043/jui/css/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png", "Referer=http://192.168.0.100/bugfree/index.php/bug/list/1", ENDITEM,
  41.         "URL=/bugfree/assets/bceb9043/jui/css/base/images/ui-icons_222222_256x240.png", "Referer=http://192.168.0.100/bugfree/index.php/bug/list/1", ENDITEM,
  42.         LAST);

  43.     web_submit_data("getProductModule",
  44.         "Action=http://192.168.0.100/bugfree/index.php/search/getProductModule",
  45.         "Method=POST",
  46.         "TargetFrame=",
  47.         "RecContentType=text/html",
  48.         "Referer=http://192.168.0.100/bugfree/index.php/bug/list/1",
  49.         "Snapshot=t72.inf",
  50.         "Mode=HTML",
  51.         ITEMDATA,
  52.         "Name=product_id", "Value=1", ENDITEM,
  53.         "Name=productmodule_id", "Value=0", ENDITEM,
  54.         LAST);

  55.     lr_end_transaction("登录", LR_AUTO);

  56.     lr_start_transaction("新建case");

  57.     lr_think_time(13);

  58.     web_url("edit",
  59.         "URL=http://192.168.0.100/bugfree/index.php/info/edit?type=bug&action=opened&product_id=1",
  60.         "TargetFrame=",
  61.         "Resource=0",
  62.         "RecContentType=text/html",
  63.         "Referer=http://192.168.0.100/bugfree/index.php/bug/list/1",
  64.         "Snapshot=t73.inf",
  65.         "Mode=HTML",
  66.         EXTRARES,
  67.         "URL=/bugfree/assets/5839844b/themes/default/default.css", "Referer=http://192.168.0.100/bugfree/index.php/info/edit?type=bug&action=opened&product_id=1", ENDITEM,
  68.         "URL=/bugfree/assets/5839844b/themes/default/default.png", "Referer=http://192.168.0.100/bugfree/index.php/info/edit?type=bug&action=opened&product_id=1", ENDITEM,
  69.         "URL=/bugfree/assets/31570e3b/indicator.gif", "Referer=http://192.168.0.100/bugfree/index.php/info/edit?type=bug&action=opened&product_id=1", ENDITEM,
  70.         LAST);

  71.     lr_think_time(35);

  72.     web_reg_find("Search=All",
  73.         "TextPfx=/bug/",
  74.         "TextSfx=\"",
  75.         LAST);
  76. //Correlation comment - Do not change!Original value='4' Name ='CorrelationParameter_1'

  77.     web_reg_save_param(
  78.         "CorrelationParameter_1",
  79.         "LB=bug/",
  80.         "RB=';</script",
  81.         "Ordinal=5",
  82.         SEARCH_FILTERS,
  83.         "Scope=All",
  84.         "RequestUrl=*/edit*",
  85.         LAST);

  86.     web_submit_data("edit_2",
  87.         "Action=http://192.168.0.100/bugfree/index.php/info/edit?type=bug&action=opened&product_id=1",
  88.         "Method=POST",
  89.         "EncType=multipart/form-data",
  90.         "TargetFrame=",
  91.         "RecContentType=text/html",
  92.         "Referer=http://192.168.0.100/bugfree/index.php/info/edit?type=bug&action=opened&product_id=1",
  93.         "Snapshot=t74.inf",
  94.         "Mode=HTML",
  95.         ITEMDATA,
  96.         "Name=BugInfoView[deleted_file_id]", "Value=", ENDITEM,
  97.         "Name=BugInfoView[lock_version]", "Value=", ENDITEM,
  98.         "Name=BugInfoView[product_id]", "Value=1", ENDITEM,
  99.         "Name=isPageDirty", "Value=1", ENDITEM,
  100.         "Name=templateTitle", "Value=", ENDITEM,
  101.         "Name=BugInfoView[title]", "Value=case03", ENDITEM,
  102.         "Name=layer1_module", "Value=0", ENDITEM,
  103.         "Name=BugInfoView[productmodule_id]", "Value=0", ENDITEM,
  104.         "Name=BugInfoView[assign_to_name]", "Value=系统管理员", ENDITEM,
  105.         "Name=BugInfoView[mail_to]", "Value=", ENDITEM,
  106.         "Name=BugInfoView[severity]", "Value=1", ENDITEM,
  107.         "Name=BugInfoView[priority]", "Value=1", ENDITEM,
  108.         "Name=Custom[BugType]", "Value=用户界面", ENDITEM,
  109.         "Name=Custom[HowFound]", "Value=功能测试", ENDITEM,
  110.         "Name=Custom[BugOS]", "Value=Windows 7", ENDITEM,
  111.         "Name=Custom[BugBrowser]", "Value=IE 8.0", ENDITEM,
  112.         "Name=Custom[OpenedBuild]", "Value=B001", ENDITEM,
  113.         "Name=Custom[ResolvedBuild]", "Value=", ENDITEM,
  114.         "Name=Custom[BugSubStatus]", "Value=", ENDITEM,
  115.         "Name=Custom[BugMachine]", "Value=", ENDITEM,
  116.         "Name=Custom[BugKeyword]", "Value=", ENDITEM,
  117.         "Name=BugInfoView[related_bug]", "Value=", ENDITEM,
  118.         "Name=BugInfoView[related_case]", "Value=", ENDITEM,
  119.         "Name=BugInfoView[related_result]", "Value=", ENDITEM,
  120.         "Name=attachment_file[]", "Value=", "File=yes", ENDITEM,
  121.         "Name=BugInfoView[action_note]", "Value=登录失败", ENDITEM,
  122.         "Name=BugInfoView[repeat_step]", "Value=[步骤]<br />\r\n"
  123.         "1.登录<br />\r\n"
  124.         "2.<br />\r\n"
  125.         "<br />\r\n"
  126.         "[结果]<br />\r\n"
  127.         "&nbsp;登录失败<br />\r\n"
  128.         "[期望]<br />\r\n"
  129.         "&nbsp;登录成功<br />\r\n"
  130.         "[备注]<br />\r\n"
  131.         "<br />", ENDITEM,
  132.         LAST);

  133.     web_url("BugFree",
  134.         "URL=http://192.168.0.100/bugfree/index.php/bug/list/1",
  135.         "TargetFrame=",
  136.         "Resource=0",
  137.         "RecContentType=text/html",
  138.         "Referer=http://192.168.0.100/bugfree/index.php/info/edit?type=bug&action=opened&product_id=1",
  139.         "Snapshot=t75.inf",
  140.         "Mode=HTML",
  141.         LAST);

  142.     web_url("case03",
  143.         "URL=http://192.168.0.100/bugfree/index.php/bug/{CorrelationParameter_1}",
  144.         "TargetFrame=_blank",
  145.         "Resource=0",
  146.         "RecContentType=text/html",
  147.         "Referer=http://192.168.0.100/bugfree/index.php/info/edit?type=bug&action=opened&product_id=1",
  148.         "Snapshot=t76.inf",
  149.         "Mode=HTML",
  150.         LAST);

  151.     web_custom_request("s.x.baidu.com",
  152.         "URL=http://s.x.baidu.com/",
  153.         "Method=POST",
  154.         "TargetFrame=",
  155.         "Resource=0",
  156.         "RecContentType=application/octet-stream",
  157.         "Referer=",
  158.         "Snapshot=t77.inf",
  159.         "Mode=HTML",
  160.         "EncType=application/octet-stream",
  161.         "BodyBinary=\\x00\\x00\\x00A\\x00\\x00\\x08\\x0B\\x10\\x01\\x18\\x00\" eb8e0f0d521396106a88e2e50eac0a70(\\xFF箑\\x80\\x80\\x80纮\\x042\\x008\\x02@\\x00H\\x06P\\x01X鬘` \\x00\\x00\\x00\\x00\\x00\\x00",
  162.         LAST);

  163.     web_submit_data("getProductModule_2",
  164.         "Action=http://192.168.0.100/bugfree/index.php/search/getProductModule",
  165.         "Method=POST",
  166.         "TargetFrame=",
  167.         "RecContentType=text/html",
  168.         "Referer=http://192.168.0.100/bugfree/index.php/bug/list/1",
  169.         "Snapshot=t78.inf",
  170.         "Mode=HTML",
  171.         ITEMDATA,
  172.         "Name=product_id", "Value=1", ENDITEM,
  173.         "Name=productmodule_id", "Value=0", ENDITEM,
  174.         LAST);

  175.     web_url("getPreNextId",
  176.         "URL=http://192.168.0.100/bugfree/index.php/search/getPreNextId?id={CorrelationParameter_1}&type=bug&product_id=1",
  177.         "TargetFrame=",
  178.         "Resource=0",
  179.         "RecContentType=text/html",
  180.         "Referer=http://192.168.0.100/bugfree/index.php/bug/{CorrelationParameter_1}",
  181.         "Snapshot=t79.inf",
  182.         "Mode=HTML",
  183.         LAST);

  184.     web_custom_request("s.x.baidu.com_2",
  185.         "URL=http://s.x.baidu.com/",
  186.         "Method=POST",
  187.         "TargetFrame=",
  188.         "Resource=0",
  189.         "RecContentType=application/octet-stream",
  190.         "Referer=",
  191.         "Snapshot=t80.inf",
  192.         "Mode=HTML",
  193.         "EncType=application/octet-stream",
  194.         "BodyBinary=\\x00\\x00\\x00y\\x00\\x00\\x08\\x0B\\x10\\x01\\x18\\x00\" eb8e0f0d521396106a88e2e50eac0a70(\\xFF箑\\x80\\x80\\x80纮\\x04285袸暘\\x13m灌\\x15L鞋7洺q2XX8在z\\xF4\\x0E厞O勫?5{亽8'2\n"
  195.         "螳k\\x80钖H,~箦\\x1C\\x16u78\\x02@\\x00H\\x06P\\x01X鬘` \\x00\\x00\\x00@\\x00\\x00h\\x03?C}獽\\xC6\\x05l%zpZ\\xDD/荎\\xE5\\x1AG;慟\\xFC+篻r嬫造鄹]\\x17\\x0B$\\xFFEc訆蔪縋l8kH叓9炘鮶\\x0E圥\\xA3",
  196.         LAST);

  197.     lr_end_transaction("新建case", LR_AUTO);

  198.     lr_think_time(8);

  199.     web_url("4",
  200.         "URL=http://192.168.0.100/bugfree/index.php/bug/{CorrelationParameter_1}",
  201.         "TargetFrame=",
  202.         "Resource=0",
  203.         "RecContentType=text/html",
  204.         "Referer=http://192.168.0.100/bugfree/index.php/bug/list/1",
  205.         "Snapshot=t81.inf",
  206.         "Mode=HTML",
  207.         LAST);

  208.     web_url("getPreNextId_2",
  209.         "URL=http://192.168.0.100/bugfree/index.php/search/getPreNextId?id={CorrelationParameter_1}&type=bug&product_id=1",
  210.         "TargetFrame=",
  211.         "Resource=0",
  212.         "RecContentType=text/html",
  213.         "Referer=http://192.168.0.100/bugfree/index.php/bug/{CorrelationParameter_1}",
  214.         "Snapshot=t82.inf",
  215.         "Mode=HTML",
  216.         LAST);

  217.     lr_start_transaction("解决case");

  218.     lr_think_time(10);

  219.     web_custom_request("s.x.baidu.com_3",
  220.         "URL=http://s.x.baidu.com/",
  221.         "Method=POST",
  222.         "TargetFrame=",
  223.         "Resource=0",
  224.         "RecContentType=application/octet-stream",
  225.         "Referer=",
  226.         "Snapshot=t83.inf",
  227.         "Mode=HTML",
  228.         "EncType=application/octet-stream",
  229.         "BodyBinary=\\x00\\x00\\x00y\\x00\\x00\\x08\\x0B\\x10\\x01\\x18\\x01\" eb8e0f0d521396106a88e2e50eac0a70(\\xFF箑\\x80\\x80\\x80纮\\x04285袸暘\\x13m灌\\x15L鞋7洺q2XX8在z\\xF4\\x0E厞O勫?5{亽8'2\n"
  230.         "螳k\\x80钖H,~箦\\x1C\\x16u78\\x02@\\x00H\\x06P\\x01X鬘` \\x00\\x00\\x00H\\x00\\x00誠拖鵪\\x17避?\\x97\\xFFi熓\\x14锋v_襲|~锝坩t菎\\x1C\\x91,Z?\\x80⑷蕷\\xF048\\xAF\\x14軗s嫃\\x07%药2B\\xB0\\x1Af\\x04DdA\\xE2\\x0C泧幺",
  231.         LAST);

  232.     web_url("resolved",
  233.         "URL=http://192.168.0.100/bugfree/index.php/bug/{CorrelationParameter_1}/resolved",
  234.         "TargetFrame=",
  235.         "Resource=0",
  236.         "RecContentType=text/html",
  237.         "Referer=http://192.168.0.100/bugfree/index.php/bug/{CorrelationParameter_1}",
  238.         "Snapshot=t84.inf",
  239.         "Mode=HTML",
  240.         LAST);

  241.     lr_think_time(17);

  242.     web_submit_data("resolved_2",
  243.         "Action=http://192.168.0.100/bugfree/index.php/bug/{CorrelationParameter_1}/resolved",
  244.         "Method=POST",
  245.         "EncType=multipart/form-data",
  246.         "TargetFrame=",
  247.         "RecContentType=text/html",
  248.         "Referer=http://192.168.0.100/bugfree/index.php/bug/{CorrelationParameter_1}/resolved",
  249.         "Snapshot=t85.inf",
  250.         "Mode=HTML",
  251.         ITEMDATA,
  252.         "Name=BugInfoView[deleted_file_id]", "Value=", ENDITEM,
  253.         "Name=BugInfoView[lock_version]", "Value=1", ENDITEM,
  254.         "Name=BugInfoView[product_id]", "Value=1", ENDITEM,
  255.         "Name=isPageDirty", "Value=1", ENDITEM,
  256.         "Name=templateTitle", "Value=", ENDITEM,
  257.         "Name=BugInfoView[title]", "Value=case03", ENDITEM,
  258.         "Name=layer1_module", "Value=0", ENDITEM,
  259.         "Name=BugInfoView[productmodule_id]", "Value=0", ENDITEM,
  260.         "Name=BugInfoView[assign_to_name]", "Value=系统管理员", ENDITEM,
  261.         "Name=BugInfoView[mail_to]", "Value=", ENDITEM,
  262.         "Name=BugInfoView[severity]", "Value=1", ENDITEM,
  263.         "Name=BugInfoView[priority]", "Value=1", ENDITEM,
  264.         "Name=Custom[BugType]", "Value=用户界面", ENDITEM,
  265.         "Name=Custom[HowFound]", "Value=功能测试", ENDITEM,
  266.         "Name=Custom[BugOS]", "Value=Windows 7", ENDITEM,
  267.         "Name=Custom[BugBrowser]", "Value=IE 8.0", ENDITEM,
  268.         "Name=Custom[OpenedBuild]", "Value=B001", ENDITEM,
  269.         "Name=Custom[ResolvedBuild]", "Value=B002", ENDITEM,
  270.         "Name=BugInfoView[solution]", "Value=Fixed", ENDITEM,
  271.         "Name=BugInfoView[duplicate_id]", "Value=", ENDITEM,
  272.         "Name=Custom[BugSubStatus]", "Value=", ENDITEM,
  273.         "Name=Custom[BugMachine]", "Value=", ENDITEM,
  274.         "Name=Custom[BugKeyword]", "Value=", ENDITEM,
  275.         "Name=BugInfoView[related_bug]", "Value=", ENDITEM,
  276.         "Name=BugInfoView[related_case]", "Value=", ENDITEM,
  277.         "Name=BugInfoView[related_result]", "Value=", ENDITEM,
  278.         "Name=attachment_file[]", "Value=", "File=yes", ENDITEM,
  279.         "Name=BugInfoView[action_note]", "Value=已解决", ENDITEM,
  280.         "Name=BugInfoView[repeat_step]", "Value=[步骤]<br />\r\n"
  281.         "1.登录<br />\r\n"
  282.         "2.<br />\r\n"
  283.         "<br />\r\n"
  284.         "[结果]<br />\r\n"
  285.         "&nbsp;登录失败<br />\r\n"
  286.         "[期望]<br />\r\n"
  287.         "&nbsp;登录成功<br />\r\n"
  288.         "[备注]<br />\r\n"
  289.         "<br />", ENDITEM,
  290.         LAST);

  291.     web_url("BugFree_2",
  292.         "URL=http://192.168.0.100/bugfree/index.php/bug/list/1",
  293.         "TargetFrame=",
  294.         "Resource=0",
  295.         "RecContentType=text/html",
  296.         "Referer=http://192.168.0.100/bugfree/index.php/bug/{CorrelationParameter_1}/resolved",
  297.         "Snapshot=t86.inf",
  298.         "Mode=HTML",
  299.         LAST);

  300.     web_url("case03_2",
  301.         "URL=http://192.168.0.100/bugfree/index.php/bug/{CorrelationParameter_1}",
  302.         "TargetFrame=_blank",
  303.         "Resource=0",
  304.         "RecContentType=text/html",
  305.         "Referer=http://192.168.0.100/bugfree/index.php/bug/{CorrelationParameter_1}/resolved",
  306.         "Snapshot=t87.inf",
  307.         "Mode=HTML",
  308.         LAST);

  309.     web_submit_data("getProductModule_3",
  310.         "Action=http://192.168.0.100/bugfree/index.php/search/getProductModule",
  311.         "Method=POST",
  312.         "TargetFrame=",
  313.         "RecContentType=text/html",
  314.         "Referer=http://192.168.0.100/bugfree/index.php/bug/list/1",
  315.         "Snapshot=t88.inf",
  316.         "Mode=HTML",
  317.         ITEMDATA,
  318.         "Name=product_id", "Value=1", ENDITEM,
  319.         "Name=productmodule_id", "Value=0", ENDITEM,
  320.         LAST);

  321.     web_url("getPreNextId_3",
  322.         "URL=http://192.168.0.100/bugfree/index.php/search/getPreNextId?id={CorrelationParameter_1}&type=bug&product_id=1",
  323.         "TargetFrame=",
  324.         "Resource=0",
  325.         "RecContentType=text/html",
  326.         "Referer=http://192.168.0.100/bugfree/index.php/bug/{CorrelationParameter_1}",
  327.         "Snapshot=t89.inf",
  328.         "Mode=HTML",
  329.         LAST);

  330.     lr_end_transaction("解决case", LR_AUTO);

  331. return 0;
  332. }



来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/21112063/viewspace-1792882/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2012-01-20

  • 博文量
    3
  • 访问量
    62714