效能測試基礎-HTTP用例設計

來源:互聯網
上載者:User

標籤:ble   rtl   value   source   send   admin   content   uri   item   

JSON格式請求: 

web_custom_request("https://xx.xx.xx.xx:xx/pvcpappinf//msgcustomization/xinPowGenDay, //介面地址
"URL=https://xx.xx.xx.xx:xx/pvcpappinf/msgcustomization/xinPowGenDay", 
"Method=POST",  
        "Referer=", 
        "Mode=HTTP",
        "EncType=application/json; charset=UTF-8",
        "Body={\"userNo\":\"csadmin\"}",//JSON報文
LAST);

WEBSERVICE格式請求(REQUEST方式類比):

web_custom_request("GetProductInfo",
        "URL=http://xx.xx.xx.xx:xx/orderproductservice.svc",
        "Method=POST", 
        "Referer=",
        "Mode=HTTP",
        "EncType=application/soap+xml; charset=UTF-8",
        "Body=<s:Envelope xmlns:s=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:a=\"http://www.w3.org/2005/08/addressing\"><s:Header><a:Action s:mustUnderstand=\"1\">http://tempuri.org/IProductService/GetProductInfo</a:Action><a:MessageID>urn:uuid:27696e1a-29cd-4c49-aa94-e9d9784ee711</a:MessageID><a:ReplyTo><a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address></a:ReplyTo><a:To s:mustUnderstand=\"1\">http://xx.xx.xx.xx:xx/orderproductservice.svc</a:To></s:Header><s:Body><GetProductInfo xmlns=\"http://tempuri.org/\"><productId>{producid}</productId></GetProductInfo></s:Body></s:Envelope>",
LAST);

表單提交方式:

web_submit_data("default.aspx",

    "Action=http://lazarus/flightnet/default.aspx",

    "Method=POST",

    "TargetFrame=",

    "RecContentType=text/html",

    "Referer=http://lazarus/flightnet/",

    "Snapshot=t7.inf",

    "Mode=HTML",

    ITEMDATA,

    "Name=grpType", "Value=radRoundtrip", ENDITEM,

    "Name=lstDepartingCity", "Value=DEN", ENDITEM,

    "Name=lstDestinationCity", "Value=LAX", ENDITEM,

    "Name=txtDepartureDate", "Value=8/19/2003", ENDITEM,

    "Name=txtReturnDate", "Value=8/19/2003", ENDITEM,

    "Name=txtQuantity", "Value=1", ENDITEM,

    "Name=radClass", "Value=1", ENDITEM,

    "Name=radSeat", "Value=1", ENDITEM,

    "Name=btnAvailableFlights", "Value=Next >", ENDITEM,

    LAST );

帶表頭的HTTTP請求:(類比APP端請求,會增加特殊的頭驗證)

web_add_header("user-agent","android");web_add_header("Connection","false");web_add_header("Authorization","");web_add_header("Accept-Encoding","Accept_Encoding");web_add_header("Content-Type","application/json;charset=UTF-8"); lr_start_transaction("articleAdvertList"); web_reg_find("Text/IC=code\":\"000000", "SaveCount=abc_count", "LAST");     web_custom_request("articleAdvertList",         "URL=http://192.168.62.155/platinfo/v1/articleAdvertList",        "Method=POST",         "Resource=0",        "Referer=http://192.168.62.151:8130",         "Snapshot=t2.inf",         "Mode=HTTP",         //"EncType=",        "Body={sender1}",         LAST);

效能測試基礎-HTTP用例設計

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.