The difference between web_custom_request and Web_submit_data in LoadRunner

Source: Internet
Author: User
Tags all mail

The Web_custom_request method can send a post and a get type of request Web_submit_data can only send a post type of request all Web_submit_data methods send requests are available using Web_custom_ Request to implement Web_custom_request can implement Web_submit_data cannot be implemented, such as "Query all mail and delete" In this case, query we use the association of all messages corresponding to the identity to grab an array, if the use of web_ Submit_data to complete this delete request, requires a lot of Web_submit_data requests to complete, but the use of web_custom_request can be done through a request, the method is to write their own code to spell a web_custom_ The body value of the request method post. The data submitted in the Web_submit_data request exists in this way, "Name= Property name, "," value=property value "such as:" Name=locale "," value=L2″, Enditem, "Name=datacenter "," value=yh ", Enditem," Name=username "," value=12044″, Enditem, if we want to commit a property that contains multiple values (in the case of the example above), it cannot be processed and can be handled only by multiple web_submit_data. The following is a typical web_submit_data and web_custom_request request, and you can see that the data submitted in Web_custom_request (body) is in such a way that the "body= Property Name = property Value & Property Name = property value &... "Web_submit_data (" Login "," Action=http://192.168.14.21:78......ndex_sso.jsp ","Method=POST "," Reccontenttype=text/html "," Referer=http://192.168.14.21:7888...%3d%2findex_sso.jsp ","Mode=HTML ", ItemData," Name=locale "," value=L2″, Enditem, "Name=datacenter "," value=yh ", Enditem," Name=username "," value=12044″, Enditem, "Name=password "," value=", Enditem," Name=_eventid "," value=Submit ", Enditem," Name=ispureweb "," value=true", Enditem," Name=solutionname "," value=eas ", Enditem," Name=dbtype "," value=1″, Enditem, "Name=eassessionid "," VALUE=EAS;YH; L2;12044; Basedb ", Enditem," Name=userauthpattern "," value=Basedb ", Enditem," Name=loginflow "," value=true", Enditem, last); Web_custom_request ("Commonquerydialog.jsf_3″," URL=http://192.168.14.21:7888/EA...UERYDIALOG.JSF ","Method=POST "," Resource=0″, "Reccontenttype=text/JavaScript "," Referer=http://192.168.14.21:7888/... Dailyloanuerc%2bihtml ","Mode=HTML "," EncType=application/x-www-form-urlencoded;charset=utf-8″, "Body=querydialog%3aselectsolutionlist=%e6%9f%a5%e8%af%a2&querydialog%3aj_iduserfilterpanel_3_value= kd5qoaepeadgaaf8wkgedmznrtq%3d&=%e6%b9% the%e5%8d% the%e4%ba%9a%e5%8d%8e%e4%b9%b3%e4%b8%9a%e6%9c% the%e9% About% -%e5% -%ac%e5%8f%b8&querydialog%3aj_iduserfilterpanel_6=&querydialog%3aj_iduserfilterpanel_9_value=3&=%e5%a4%a7%e4%ba%8e%e7%ad% the%e4%ba%8e&querydialog%3aj_iduserfilterpanel_11=0&querydialog%3aj_iduserfilterpanel_14_value=&=&querydialog%3aj_iduserfilterpanel_17_value=&= &querydialog%3aj_iduserfilterpanel_20_value=&=&querydialog%3aj_iduserfilterpanel_23_value=&= &querydialog%3aj_iduserfilterpanel_26_value=&=&querydialog%3aj_iduserfilterpanel_29_value=&= &queryDialog%3Aj_iduserFilterPanel_32=&queryDialog%3Aj_iduserFilterPanel_35_value=&=& querydialog%3aj_iduserfilterpanel_38= -- ,- on&querydialog%3aj_iduserfilterpanel_41= -- ,- -&queryDialog%3AfilterGrid_modifiedData=%5B%5D&queryDialog%3AfilterGrid_removedData=%5B%5D& querydialog%3a_postback=&querydialog%3auserfilterpanel=%2fcp%2fbc%2fdailyloanbillcommquery.xhtml& Javax.faces.viewstate={VS2} ", last); Through my observation, there are two cases where the post request is recorded by LoadRunner as Web_custom_request,1. Request for batch submission of multiple data with the same attribute name mentioned above2. Header Property x-requested-a POST request with a value of XMLHttpRequest there is one more thing to note about the method of implementing the request is that the value of the property in the body in web_custom_request, if it contains some special characters, must be encoded by URL, Otherwise the Web server will return a 500 error, a typical example of which is if the body contains a viewstate,viewstate that often has "="Special characters like this, which must be encoded by URL at this time, Loadruner provides an encoding conversion function such as Web_convert_param (" Vs1″, "sourceencoding=html "," targetencoding=URL ", last); In addition to LoadRunner, you can press CTRL in Fiddler+e to convert

The difference between web_custom_request and Web_submit_data in LoadRunner

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.