性能测试

性能测试进阶指南——用户行为模拟(续)

Script type 提供了基于 HTML 方式下的两种不同的脚本类型。 1)高级选项下的 Script type 脚本类型选项 ① A script describing user actions 基于解释用户行为的脚本,后面提示使用类似 web_link、web_submit_form 等的函数, 这种脚本录制出来有些类似于 QTP 基于对象识别操作的模式,具体描述了用户进行了什么 操作。 现在我们使用这种方式录制一个脚本(打开 Phpwind 网站,然后单击一个叫作 LR 的 板块链接),录制完成后可以得到如下类似脚本:

                            web_add_cookie("login=admin; DOMAIN=127.0.0.1"); 

                            web_url("phpwind85",

                                       "URL=http://localhost:8000/phpwind85/", 

                                       "Resource=0",  "RecContentType=text/html", 

                                       "Referer=",  "Snapshot=t3.inf", 

                                       "Mode=HTML",  EXTRARES, 

                                       "Url=js/lang/zh_cn.js", ENDITEM,

                                       "Url=images/wind85/navA.png", ENDITEM, 

                                       "Url=images/wind85/bg.jpg", ENDITEM,  

                                       "Url=images/wind85/topbar.png", ENDITEM, 

                                       "Url=images/button.png", ENDITEM, 

                                       "Url=images/select_arrow.gif", ENDITEM, 

                                       "Url=images/wind85/search_btn.png", ENDITEM,  

                                       "Url=images/wind85/down.png", ENDITEM, 

                                       "Url=images/wind85/searchA.png", ENDITEM, 

                                       "Url=images/wind85/hB.png", ENDITEM,  

                                       "Url=images/wind85/colon.png", ENDITEM, 

                                       "Url=images/wind85/old.gif", ENDITEM, 

                                       "Url=images/wind85/h.png", ENDITEM, 

                                       "Url=images/pwicon/top.png", ENDITEM,

                                       "Url=images/wind8black/preview.jpg", ENDITEM,                                                                                               "Url=images/wind/preview.jpg", ENDITEM,                                                                                                           "Url=images/wind8purple/preview.jpg", ENDITEM,                                                                                             "Url=images/wind8gray/preview.jpg", ENDITEM,  

                                       "Url=images/del.png", ENDITEM,  

                                        "Url=images/wind8green/preview.jpg", ENDITEM,                                                                                              "Url=images/wind85/preview.jpg", ENDITEM,                                                                                                      "Url=images/register/regright.png", ENDITEM,

                                         LAST);

                                       web_link("LR",

                                          "Text=LR", 

                                          "Snapshot=t4.inf", 

                                           LAST);


文章评论

表情

共 0 条评论,查看全部
  • 这篇文章还没有收到评论,赶紧来抢沙发吧~