<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      LoadRunner 對 WebTours 實現(xiàn)訂票的性能分析

      一、WebTours的使用教程:

      1. 啟動后臺  https://blog.csdn.net/qq_15228737/article/details/82930603
      2. 操作教程 https://cloud.tencent.com/developer/article/1685259

      二、腳本錄制

        tips:

      1. 將“登錄”,“退出”操作放在init,end里面
      2. 有一個session的關聯(lián)函數(shù),和flytype的關聯(lián)函數(shù),使用關聯(lián)函數(shù)時用{session}這樣調(diào)用
      3. 先添加集合點,再添加事務。集合點的意思是所有賬戶準備好后,同一個時間點調(diào)用
      4. 每一個操作設置成單獨的一個事務,這樣在報告中就可對每一個事務動作的吞吐量有展示
      5. 錄制腳本中對變量參數(shù)化的方法  https://blog.csdn.net/zzz19931216z/article/details/73325428/
      6. 變量初始化、關聯(lián)函數(shù)一定要放在使用之前,與C語言類似
      Action()
      {
          int i=0;//循環(huán)訂票的游標變量
          char temp[255];//臨時存儲字符串變量
          int count=0;//存儲循環(huán)關聯(lián)數(shù)組長度變量
          char tempfly[255];//臨時存儲字符串變量
      
          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=t4.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=t5.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_reg_save_param("sessionuser","LB=<input type=hidden name=userSession value=","RB=>",LAST);//獲取用于session值的關聯(lián)函數(shù)
          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_concurrent_start(NULL);
      
          web_url("JSFormSubmit.js", 
              "URL=http://127.0.0.1:1080/WebTours/JSFormSubmit.js", 
              "Resource=1", 
              "RecContentType=application/x-javascript", 
              "Referer=http://127.0.0.1:1080/WebTours/nav.pl?in=home", 
              "Snapshot=t8.inf", 
              LAST);
      
          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=t9.inf", 
              LAST);
      
          web_concurrent_end(NULL);
      
          lr_start_transaction("login-0");
      
          lr_think_time(9);
          lr_error_message("sessionuser:%s",lr_eval_string("{sessionuser}"));//打印關聯(lián)到的用戶session值
          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=t10.inf", 
              "Mode=HTTP", 
              ITEMDATA, 
              "Name=userSession", "Value={sessionuser}", ENDITEM, 
              "Name=username", "Value=test001", ENDITEM, 
              "Name=password", "Value=123456", ENDITEM, 
              "Name=JSFormSubmit", "Value=on", ENDITEM, 
              "Name=login.x", "Value=64", ENDITEM, 
              "Name=login.y", "Value=15", ENDITEM, 
              LAST);
      
          web_concurrent_start(NULL);
      
          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_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=t16.inf", 
              "Mode=HTTP", 
              LAST);
      
          web_concurrent_end(NULL);
      
          web_concurrent_start(NULL);
      
          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=t12.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=t13.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=t14.inf", 
              LAST);
      
          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=t15.inf", 
              LAST);
      
          web_concurrent_end(NULL);
      
          lr_end_transaction("login-0",LR_AUTO);
      
          lr_start_transaction("book-1");
      
          lr_think_time(11);
      
          web_url("Search Flights Button", 
              "URL=http://127.0.0.1:1080/WebTours/welcome.pl?page=search", 
              "Resource=0", 
              "RecContentType=text/html", 
              "Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=home", 
              "Snapshot=t17.inf", 
              "Mode=HTTP", 
              LAST);
      
          web_concurrent_start(NULL);
      
          web_url("reservations.pl", 
              "URL=http://127.0.0.1:1080/WebTours/reservations.pl?page=welcome", 
              "Resource=0", 
              "RecContentType=text/html", 
              "Referer=http://127.0.0.1:1080/WebTours/welcome.pl?page=search", 
              "Snapshot=t18.inf", 
              "Mode=HTTP", 
              LAST);
      
          web_url("nav.pl_3", 
              "URL=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=flights", 
              "Resource=0", 
              "RecContentType=text/html", 
              "Referer=http://127.0.0.1:1080/WebTours/welcome.pl?page=search", 
              "Snapshot=t19.inf", 
              "Mode=HTTP", 
              LAST);
      
          web_concurrent_end(NULL);
      
          web_concurrent_start(NULL);
      
          web_url("home.gif", 
              "URL=http://127.0.0.1:1080/WebTours/images/home.gif", 
              "Resource=1", 
              "RecContentType=image/gif", 
              "Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=flights", 
              "Snapshot=t20.inf", 
              LAST);
      
          web_url("itinerary.gif_2", 
              "URL=http://127.0.0.1:1080/WebTours/images/itinerary.gif", 
              "Resource=0", 
              "RecContentType=text/html", 
              "Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=flights", 
              "Mode=HTTP", 
              LAST);
      
          web_url("signoff.gif_2", 
              "URL=http://127.0.0.1:1080/WebTours/images/signoff.gif", 
              "Resource=0", 
              "RecContentType=text/html", 
              "Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=flights", 
              "Mode=HTTP", 
              LAST);
      
          web_url("in_flights.gif", 
              "URL=http://127.0.0.1:1080/WebTours/images/in_flights.gif", 
              "Resource=1", 
              "RecContentType=image/gif", 
              "Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=flights", 
              "Snapshot=t21.inf", 
              LAST);
      
          web_concurrent_end(NULL);
      
          web_url("button_next.gif", 
              "URL=http://127.0.0.1:1080/WebTours/images/button_next.gif", 
              "Resource=1", 
              "RecContentType=image/gif", 
              "Referer=http://127.0.0.1:1080/WebTours/reservations.pl?page=welcome", 
              "Snapshot=t22.inf", 
              LAST);
          web_reg_save_param("flytype","LB=<input type = radio name=outboundFlight value=","RB=>","ORD=ALL","Savelen=18",LAST);//關聯(lián)取得出現(xiàn)的4張電子機票
      //      web_reg_save_param("seatPref","LB=<input type=\"radio\" name=\"seatPref\" value=\"","RB=\" ","ORD=ALL","SaveLen=6",LAST);
      //  web_reg_save_param("seatType","LB=<input type=\"radio\" name=\"seatType\" value=\"","RB=\" ","ORD=ALL","SaveLen=8",LAST);
          lr_error_message("seatPref_1:",lr_eval_string("{seatPref_1}"));
          lr_error_message("seatPref_2:",lr_eval_string("{seatPref_2}"));
          lr_error_message("seatPref_3:",lr_eval_string("{seatPref_3}"));
          lr_error_message("seatType_1:",lr_eval_string("{seatType_1}"));
          lr_error_message("seatType_2:",lr_eval_string("{seatType_2}"));
          lr_error_message("seatType_3:",lr_eval_string("{seatType_3}"));
          web_submit_data("reservations.pl_2", 
              "Action=http://127.0.0.1:1080/WebTours/reservations.pl", 
              "Method=POST", 
              "RecContentType=text/html", 
              "Referer=http://127.0.0.1:1080/WebTours/reservations.pl?page=welcome", 
              "Snapshot=t23.inf", 
              "Mode=HTTP", 
              ITEMDATA, 
              "Name=advanceDiscount", "Value=0", ENDITEM, 
              "Name=depart", "Value=Denver", ENDITEM, 
              "Name=departDate", "Value=05/29/2013", ENDITEM, 
              "Name=arrive", "Value={endplace}", ENDITEM, 
              "Name=returnDate", "Value=05/30/2013", ENDITEM, 
              "Name=numPassengers", "Value=1", ENDITEM, 
              "Name=seatPref", "Value={seatPerf}", ENDITEM, 
              "Name=seatType", "Value={seatType}", ENDITEM, 
              "Name=.cgifields", "Value=roundtrip", ENDITEM, 
              "Name=.cgifields", "Value=seatType", ENDITEM, 
              "Name=.cgifields", "Value=seatPref", ENDITEM, 
              "Name=findFlights.x", "Value=80", ENDITEM, 
              "Name=findFlights.y", "Value=15", ENDITEM, 
              LAST);
          lr_error_message("seatPerf:%s",lr_eval_string("{seatPerf}"));
          lr_error_message("seatType:%s",lr_eval_string("{seatType}"));
          count = atoi(lr_eval_string("{flytype_count}"));
          lr_error_message("lenflytype:%d",count);
          lr_error_message("Flytype_1:%s",lr_eval_string("{flytype_1}"));
          lr_error_message("Flytype_2:%s",lr_eval_string("{flytype_2}"));
          lr_error_message("Flytype_3:%s",lr_eval_string("{flytype_3}"));
          lr_error_message("Flytype_4:%s",lr_eval_string("{flytype_4}"));
          for(i=0;i<count;i++)
          {
              sprintf(temp,"{flytype_%d}",i+1);//格式化flytype數(shù)組參數(shù)格式,取數(shù)組中一個存入temp變量
              lr_error_message("temp:%s",temp);//打印temp變量的內(nèi)容
              sprintf(tempfly,"%s",lr_eval_string(temp));//將temp變量通過lr_eval_string函數(shù)將temp變量存儲的對應loadrunner參數(shù)的對應內(nèi)容存入tempfly變量中
              lr_error_message("tempfly:%s",tempfly);//打印tempfly變量的內(nèi)容
              lr_error_message("lr_eval_string(tempfly):%s",lr_eval_string(tempfly));//通過lr_eval_string函數(shù)取得tempfly變量的內(nèi)容
              lr_save_string(tempfly,"flytypenum");//將tempfly變量內(nèi)容存到flytypenum參數(shù)中,方便以后lr函數(shù)使用
              lr_error_message("flytypenum:%s",lr_eval_string("{flytypenum}"));//打印flytypenum內(nèi)容
              web_submit_data("reservations.pl_3", 
                  "Action=http://127.0.0.1:1080/WebTours/reservations.pl", 
                  "Method=POST", 
                  "RecContentType=text/html", 
                  "Referer=http://127.0.0.1:1080/WebTours/reservations.pl", 
                  "Snapshot=t24.inf", 
                  "Mode=HTTP", 
                  ITEMDATA, 
                  "Name=outboundFlight", "Value={flytypenum}", ENDITEM, 
                  "Name=numPassengers", "Value=1", ENDITEM, 
                  "Name=advanceDiscount", "Value=0", ENDITEM, 
                  "Name=seatType", "Value=Coach", ENDITEM, 
                  "Name=seatPref", "Value=None", ENDITEM, 
                  "Name=reserveFlights.x", "Value=63", ENDITEM, 
                  "Name=reserveFlights.y", "Value=17", ENDITEM, 
                  LAST);
      
              web_submit_data("reservations.pl_4", 
                  "Action=http://127.0.0.1:1080/WebTours/reservations.pl", 
                  "Method=POST", 
                  "RecContentType=text/html", 
                  "Referer=http://127.0.0.1:1080/WebTours/reservations.pl", 
                  "Snapshot=t25.inf", 
                  "Mode=HTTP", 
                  ITEMDATA, 
                  "Name=firstName", "Value=test001", ENDITEM, 
                  "Name=lastName", "Value=test001", ENDITEM, 
                  "Name=address1", "Value=test001", ENDITEM, 
                  "Name=address2", "Value=123456", ENDITEM, 
                  "Name=pass1", "Value=test001 test001", ENDITEM, 
                  "Name=creditCard", "Value=", ENDITEM, 
                  "Name=expDate", "Value=", ENDITEM, 
                  "Name=oldCCOption", "Value=", ENDITEM, 
                  "Name=numPassengers", "Value=1", ENDITEM, 
                  "Name=seatType", "Value=Coach", ENDITEM, 
                  "Name=seatPref", "Value=None", ENDITEM, 
                  "Name=outboundFlight", "Value={flytypenum}", ENDITEM, 
                  "Name=advanceDiscount", "Value=0", ENDITEM, 
                  "Name=returnFlight", "Value=", ENDITEM, 
                  "Name=JSFormSubmit", "Value=off", ENDITEM, 
                  "Name=.cgifields", "Value=saveCC", ENDITEM, 
                  "Name=buyFlights.x", "Value=61", ENDITEM, 
                  "Name=buyFlights.y", "Value=8", ENDITEM, 
                  LAST);
      
          }
      
      
          web_url("bookanother.gif", 
              "URL=http://127.0.0.1:1080/WebTours/images/bookanother.gif", 
              "Resource=1", 
              "RecContentType=image/gif", 
              "Referer=http://127.0.0.1:1080/WebTours/reservations.pl", 
              "Snapshot=t26.inf", 
              LAST);
      
          lr_end_transaction("book-1",LR_AUTO);
      
          return 0;
      }

       

      posted @ 2025-09-10 10:41  *飛飛*  閱讀(11)  評論(0)    收藏  舉報
      主站蜘蛛池模板: 国产99青青成人A在线| 亚洲自拍偷拍激情视频| 竹菊影视欧美日韩一区二区三区四区五区 | 国产伦码精品一区二区| 亚洲国产精品久久久久久久| 亚洲久久色成人一二三区| 亚洲国产精品综合色在线| 日本亚洲欧洲无免费码在线| 欧美成本人视频免费播放| 久久丁香五月天综合网| 国内揄拍国产精品人妻电影| 翘臀少妇被扒开屁股日出水爆乳| 国产精品伊人久久综合网| 人妻系列无码专区无码中出| 日本精品aⅴ一区二区三区| 日韩精品三区二区三区| 精品国产一区二区三区大 | 69精品丰满人妻无码视频a片| 国产av丝袜旗袍无码网站| 色欲久久人妻内射| 欧美成人精品三级在线观看| 人妻少妇偷人精品视频| 无码人妻斩一区二区三区 | 激情五月开心婷婷深爱| 末发育娇小性色xxxxx视频| 国产精品日韩专区第一页| 亚洲成年轻人电影网站WWW| 国产精品中文一区二区| 日韩狼人精品在线观看| 亚洲国产色一区二区三区| 最新国产精品中文字幕| 国产精品一区二区三区卡| A级毛片100部免费看| 国产午夜福利精品视频| 成人亚洲国产精品一区不卡| 九九综合va免费看| 亚洲国产精品高清久久久| 日韩不卡一区二区在线观看| 狠狠cao日日穞夜夜穞av| 丰满妇女强制高潮18xxxx| 久99久热免费视频播放|