<ruby id="h6500"><table id="h6500"></table></ruby>
    1. <ruby id="h6500"><video id="h6500"></video></ruby>
          1. <progress id="h6500"><u id="h6500"><form id="h6500"></form></u></progress>
            • 軟件測試技術(shù)
            • 軟件測試博客
            • 軟件測試視頻
            • 開(kāi)源軟件測試技術(shù)
            • 軟件測試論壇
            • 軟件測試沙龍
            • 軟件測試資料下載
            • 軟件測試雜志
            • 軟件測試人才招聘
              暫時(shí)沒(méi)有公告

            字號: | 推薦給好友 上一篇 | 下一篇

            軟件測試工具LoadRunner中HTTP協(xié)議的錄制及模式

            發(fā)布: 2010-8-17 10:16 | 作者: 網(wǎng)絡(luò )轉載 | 來(lái)源: 領(lǐng)測軟件測試網(wǎng)采編 | 查看: 246次 | 進(jìn)入軟件測試論壇討論

            領(lǐng)測軟件測試網(wǎng)

            軟件測試工具LoadRunner中HTTP協(xié)議的錄制及模式

             

              一,腳本編寫(xiě)

              1, “HTML –base scrīpt”和“URL-base scrīpt”的區別

              1)“HTML –base scrīpt”默認模式,為每個(gè)用戶(hù)請求生成單獨的函數

              如:

              Action()

              {

              web_url("WebTours",

              "URL=http://127.0.0.1:1080/WebTours/",

              "Resource=0",

              "RecContentType=text/html",

              "Referer=",

              "Snapshot=t4.inf",

              "Mode=HTML",

              LAST);

              web_submit_form("login.pl",

              "Snapshot=t5.inf",

              ITEMDATA,

              "Name=username", "Value=jojo", ENDITEM,

              "Name=password", "Value=bean", ENDITEM,

              "Name=login.x", "Value=53", ENDITEM,

              "Name=login.y", "Value=13", ENDITEM,

              LAST);

              return 0;

              }

              2)“URL-base scrīpt”可以捕獲所有作為用戶(hù)操作的結果發(fā)送到服務(wù)器的HTTP請求,然后一一記錄下來(lái)?梢圆东@非HTML應用程序,例如小程序和非瀏覽器應用程序。

              如:

              Action()

              {

              web_url("WebTours",

              "URL=http://127.0.0.1:1080/WebTours/",

              "Resource=0",

              "RecContentType=text/html",

              "Referer=",

              "Snapshot=t1.inf",

              "Mode=HTTP",

              LAST);

              web_concurrent_start(NULL);

              web_url("header.html",

              "URL=http://127.0.0.1:1080/WebTours/header.html",

              "Resource=0",

              "RecContentType=text/html",

              "Referer=http://127.0.0.1:1080/WebTours/",

              "Snapshot=t2.inf",

              "Mode=HTTP",

              LAST);

              web_url("welcome.pl",

              "URL=http://127.0.0.1:1080/WebTours/welcome.pl?signOff=true",

              "Resource=0",

              "RecContentType=text/html",

              "Referer=http://127.0.0.1:1080/WebTours/",

              "Snapshot=t5.inf",

              "Mode=HTTP",

              LAST);

              web_concurrent_end(NULL);

              web_concurrent_start(NULL);

              web_url("hp_logo.png",

              "URL=http://127.0.0.1:1080/WebTours/images/hp_logo.png",

              "Resource=1",

              "RecContentType=image/png",

              "Referer=http://127.0.0.1:1080/WebTours/header.html",

              "Snapshot=t3.inf",

              LAST);

              web_url("webtours.png",

              "URL=http://127.0.0.1:1080/WebTours/images/webtours.png",

              "Resource=1",

              "RecContentType=image/png",

              "Referer=http://127.0.0.1:1080/WebTours/header.html",

              "Snapshot=t4.inf",

              LAST);

              web_concurrent_end(NULL);

              web_concurrent_start(NULL);


            web_url("home.html",

              "URL=http://127.0.0.1:1080/WebTours/home.html",

              "Resource=0",

              "RecContentType=text/html",

              "Referer=http://127.0.0.1:1080/WebTours/welcome.pl?signOff=true",

              "Snapshot=t6.inf",

              "Mode=HTTP",

              LAST);

              web_url("nav.pl",

              "URL=http://127.0.0.1:1080/WebTours/nav.pl?in=home",

              "Resource=0",

              "RecContentType=text/html",

              "Referer=http://127.0.0.1:1080/WebTours/welcome.pl?signOff=true",

              "Snapshot=t7.inf",

              "Mode=HTTP",

              LAST);

              web_concurrent_end(NULL);

              web_url("mer_login.gif",

              "URL=http://127.0.0.1:1080/WebTours/images/mer_login.gif",

              "Resource=1",

              "RecContentType=image/gif",

              "Referer=http://127.0.0.1:1080/WebTours/nav.pl?in=home",

              "Snapshot=t8.inf",

              LAST);

              web_submit_data("login.pl",

              "Action=http://127.0.0.1:1080/WebTours/login.pl",

              "Method=POST",

              "RecContentType=text/html",

              "Referer=http://127.0.0.1:1080/WebTours/nav.pl?in=home",

              "Snapshot=t9.inf",

              "Mode=HTTP",

              ITEMDATA,

              "Name=userSession", "Value=97276.8320777643fAADzHHpAfDAAccpAzcD", ENDITEM,

              "Name=username", "Value=jojo", ENDITEM,

              "Name=password", "Value=bean", ENDITEM,

              "Name=JSFormSubmit", "Value=off", ENDITEM,

              "Name=login.x", "Value=56", ENDITEM,

              "Name=login.y", "Value=11", ENDITEM,

              LAST);

              web_concurrent_start(NULL);

              web_url("login.pl_2",

              "URL=http://127.0.0.1:1080/WebTours/login.pl?intro=true",

              "Resource=0",

              "RecContentType=text/html",

              "Referer=http://127.0.0.1:1080/WebTours/login.pl",

              "Snapshot=t10.inf",

              "Mode=HTTP",

              LAST);

              web_url("nav.pl_2",

              "URL=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=home",

              "Resource=0",

              "RecContentType=text/html",

              "Referer=http://127.0.0.1:1080/WebTours/login.pl",

              "Snapshot=t11.inf",

              "Mode=HTTP",

              LAST);

              web_concurrent_end(NULL);

              web_concurrent_start(NULL);

              web_url("in_home.gif",

              "URL=http://127.0.0.1:1080/WebTours/images/in_home.gif",

              "Resource=1",

              "RecContentType=image/gif",

              "Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=home",

              "Snapshot=t12.inf",

              LAST);

              web_url("flights.gif",

              "URL=http://127.0.0.1:1080/WebTours/images/flights.gif",

              "Resource=1",

              "RecContentType=image/gif",

              "Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=home",

              "Snapshot=t13.inf",

              LAST);

              web_url("signoff.gif",

              "URL=http://127.0.0.1:1080/WebTours/images/signoff.gif",

              "Resource=1",

              "RecContentType=image/gif",

              "Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=home",

              "Snapshot=t14.inf",

              LAST);

              web_url("itinerary.gif",

              "URL=http://127.0.0.1:1080/WebTours/images/itinerary.gif",

              "Resource=1",

              "RecContentType=image/gif",

              "Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=home",

              "Snapshot=t15.inf",

              LAST);

              web_concurrent_end(NULL);

              return 0;

              }

              3)如何選擇?什么時(shí)候選擇url的錄制方式:

              * 不是基于瀏覽器的

              * 基于瀏覽器但是包含javascrīpt,并且發(fā)送了請求到服務(wù)器

              * 使用了https 安全協(xié)議

              

            延伸閱讀

            文章來(lái)源于領(lǐng)測軟件測試網(wǎng) http://kjueaiud.com/

            TAG: http HTTP Http loadrunner LoadRunner Loadrunner loadRunner 模式 軟件測試 協(xié)議

            21/212>

            關(guān)于領(lǐng)測軟件測試網(wǎng) | 領(lǐng)測軟件測試網(wǎng)合作伙伴 | 廣告服務(wù) | 投稿指南 | 聯(lián)系我們 | 網(wǎng)站地圖 | 友情鏈接
            版權所有(C) 2003-2010 TestAge(領(lǐng)測軟件測試網(wǎng))|領(lǐng)測國際科技(北京)有限公司|軟件測試工程師培訓網(wǎng) All Rights Reserved
            北京市海淀區中關(guān)村南大街9號北京理工科技大廈1402室 京ICP備2023014753號-2
            技術(shù)支持和業(yè)務(wù)聯(lián)系:info@testage.com.cn 電話(huà):010-51297073

            軟件測試 | 領(lǐng)測國際ISTQBISTQB官網(wǎng)TMMiTMMi認證國際軟件測試工程師認證領(lǐng)測軟件測試網(wǎng)

            老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月
              <ruby id="h6500"><table id="h6500"></table></ruby>
              1. <ruby id="h6500"><video id="h6500"></video></ruby>
                    1. <progress id="h6500"><u id="h6500"><form id="h6500"></form></u></progress>