{"id":2050,"date":"2011-04-29T15:49:13","date_gmt":"2011-04-29T19:49:13","guid":{"rendered":"http:\/\/www.webperformance.com\/load_testing\/blog\/?p=2050"},"modified":"2011-05-02T11:15:28","modified_gmt":"2011-05-02T15:15:28","slug":"how-to-manually-modify-requests-in-load-tester-4-2","status":"publish","type":"post","link":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/2011\/04\/how-to-manually-modify-requests-in-load-tester-4-2\/","title":{"rendered":"How To Manually Modify HTTP Requests in Load Tester 4.2"},"content":{"rendered":"<p>In older versions, Load Tester provided a simple interface for modifying the URI portion of an HTTP request.\u00a0 For example, you could add a query parameter or a path segment by adding it directly to the request line in the Edit HTTP Request-line\/URL dialog.<\/p>\n<p>&nbsp;<\/p>\n<div id=\"attachment_2051\" style=\"width: 548px\" class=\"wp-caption aligncenter\"><a rel=\"attachment wp-att-2051\" href=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/2011\/04\/how-to-manually-modify-requests-in-load-tester-4-2\/modify_requests_42_old_interface\/\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2051\" class=\"size-full wp-image-2051    \" title=\"modify_requests_42_old_interface\" src=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-content\/uploads\/2011\/04\/modify_requests_42_old_interface.png\" alt=\"The old Edit HTTP Request-line\/URL dialog\" width=\"538\" height=\"389\" \/><\/a><p id=\"caption-attachment-2051\" class=\"wp-caption-text\">The old Edit HTTP Request-line\/URL dialog<\/p><\/div>\n<p>&nbsp;<\/p>\n<p>In Load Tester 4.2, this process has been made slightly more complex but vastly more powerful.\u00a0 We&#8217;ll start by manipulating  the URI field directly.  To do so, select the specific transaction you  wish to edit, then select the Fields View, then choose &#8220;Customize&#8221; from  the &#8220;Choose customization&#8221; drop-down menu in the upper right corner of  the Fields View.  At the top under &#8220;Field Types&#8221;, uncheck the box  labeled &#8220;Filter fields by type&#8221;, then hit Ok.<\/p>\n<p>&nbsp;<\/p>\n<div id=\"attachment_2074\" style=\"width: 590px\" class=\"wp-caption aligncenter\"><a rel=\"attachment wp-att-2074\" href=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/2011\/04\/how-to-manually-modify-requests-in-load-tester-4-2\/modify_requests_42_uncheck_field_filter\/\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2074\" class=\"size-full wp-image-2074\" title=\"modify_requests_42_uncheck_field_filter\" src=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-content\/uploads\/2011\/04\/modify_requests_42_uncheck_field_filter.png\" alt=\"Clearing the Field Filter\" width=\"580\" height=\"329\" \/><\/a><p id=\"caption-attachment-2074\" class=\"wp-caption-text\">Clearing the Field Filter<\/p><\/div>\n<p style=\"text-align: center;\">&nbsp;<\/p>\n<p>This will expose all available fields for the transaction, including the  base URI field that contains the path segments (as a simple  example: &#8220;\/css\/style.css&#8221;).  Edit that field by clicking in the  Datasource column.<\/p>\n<p>&nbsp;<\/p>\n<div id=\"attachment_2083\" style=\"width: 573px\" class=\"wp-caption aligncenter\"><a rel=\"attachment wp-att-2083\" href=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/2011\/04\/how-to-manually-modify-requests-in-load-tester-4-2\/modify_requests_42_doubleclick_datasource\/\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2083\" class=\"size-full wp-image-2083 \" title=\"modify_requests_42_doubleclick_datasource\" src=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-content\/uploads\/2011\/04\/modify_requests_42_doubleclick_datasource.png\" alt=\"Double-click the Datasource Column\" width=\"563\" height=\"343\" \/><\/a><p id=\"caption-attachment-2083\" class=\"wp-caption-text\">Double-click the Datasource Column<\/p><\/div>\n<p>This will bring up the Edit Field dialog.  Select  the Datasource &#8220;Text Constant&#8221; from the drop-down menu, and then add  your query parameter to the end of the string, something like this:<\/p>\n<p style=\"text-align: center;\">&nbsp;<\/p>\n<div id=\"attachment_2099\" style=\"width: 573px\" class=\"wp-caption aligncenter\"><a rel=\"attachment wp-att-2099\" href=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/2011\/04\/how-to-manually-modify-requests-in-load-tester-4-2\/modify_requests_42_text_constant-2\/\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2099\" class=\"size-full wp-image-2099 \" title=\"modify_requests_42_text_constant\" src=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-content\/uploads\/2011\/04\/modify_requests_42_text_constant1.png\" alt=\"Adding a Query Parameter in the Text Constant Datasource\" width=\"563\" height=\"374\" \/><\/a><p id=\"caption-attachment-2099\" class=\"wp-caption-text\">Adding a Query Parameter in the Text Constant Datasource<\/p><\/div>\n<p style=\"text-align: center;\">&nbsp;<\/p>\n<p>Then hit the Ok button, and this static query parameter, &#8220;1&#8221; in our  case, will be submitted in the next replay and for every test case  iteration.<\/p>\n<p>If you need the query parameter to come from an extracted user variable  or a data set, then set up the field with the Text Constant datasource  first using just:<\/p>\n<p>\/css\/style.css?q=<\/p>\n<p>Then, select the Concatenate datasource, hit the green plus-sign button,  and add on your user variable or dataset datasource.  Note that  query parameters MUST be URL encoded, so if you have characters in your  query parameter that are not permitted, you&#8217;ll need to select the  Transform datasource, select URL Encoded, and then choose your User Variable or dataset datasource.<\/p>\n<p style=\"text-align: center;\">&nbsp;<\/p>\n<div id=\"attachment_2125\" style=\"width: 573px\" class=\"wp-caption aligncenter\"><a rel=\"attachment wp-att-2125\" href=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/2011\/04\/how-to-manually-modify-requests-in-load-tester-4-2\/modify_requests_42_url_encoded_transform\/\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2125\" class=\"size-full wp-image-2125 \" title=\"modify_requests_42_url_encoded_transform\" src=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-content\/uploads\/2011\/04\/modify_requests_42_url_encoded_transform.png\" alt=\"Adding a URL-encoded Transform of a User Variable datasource\" width=\"563\" height=\"365\" \/><\/a><p id=\"caption-attachment-2125\" class=\"wp-caption-text\">Adding a URL-encoded Transform of a User Variable datasource<\/p><\/div>\n<p>&nbsp;<\/p>\n<p>At the end of such a configuration, having set up an  extractor for the user variable &#8220;test&#8221; in a previous transaction, your  Edit Field dialog for the URI field will look something like this:<\/p>\n<p>&nbsp;<\/p>\n<div id=\"attachment_2104\" style=\"width: 586px\" class=\"wp-caption aligncenter\"><a rel=\"attachment wp-att-2104\" href=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/2011\/04\/how-to-manually-modify-requests-in-load-tester-4-2\/modify_requests_42_concatenate\/\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2104\" class=\"size-full wp-image-2104 \" title=\"modify_requests_42_concatenate\" src=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-content\/uploads\/2011\/04\/modify_requests_42_concatenate.png\" alt=\"Add a Transform, URL Encoded, User Variable &quot;test&quot;\" width=\"576\" height=\"356\" \/><\/a><p id=\"caption-attachment-2104\" class=\"wp-caption-text\">Add a Transform, URL Encoded, User Variable &quot;test&quot;<\/p><\/div>\n<p>&nbsp;<\/p>\n<p>With this method of request modification, virtually anything can be inserted into the request &#8211; datasets, user variables, text constants, or combinations of these.\u00a0 Note that there are virtually no restrictions left on what you can insert into the request, and that invalid requests may cause unexpected results; for example, if you include a line terminator in your URI, expect Load Tester (and the web server) to be very confused.<\/p>\n<p>Happy testing!<\/p>\n<p>Matt Drew<\/p>\n<p>Web Performance Test Engineer<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In older versions, Load Tester provided a simple interface for modifying the URI portion of an HTTP request.\u00a0 For example, you could add a query parameter or a path segment by adding it directly to the request line in the Edit HTTP Request-line\/URL dialog.<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\nIn Load Tester 4.2, this process has been made slightly more complex but vastly more powerful.\u00a0 We&#8217;ll start by manipulating  the URI field directly.  To do so, select the specific transaction you  wish to edit, then select the Fields View, then choose &#8220;Customize&#8221; from  the &#8220;Choose customization&#8221; drop-down menu in the upper right &hellip; <a href=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/2011\/04\/how-to-manually-modify-requests-in-load-tester-4-2\/\">Continue reading &raquo;<\/a><\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[122,49,237,123,60,51],"class_list":["post-2050","post","type-post","status-publish","format-standard","hentry","category-load-testing","tag-http-request","tag-load-tester","tag-load-testing","tag-modifying-test-cases","tag-stress-testing","tag-web-performance-load-tester"],"_links":{"self":[{"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/posts\/2050","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/comments?post=2050"}],"version-history":[{"count":80,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/posts\/2050\/revisions"}],"predecessor-version":[{"id":2179,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/posts\/2050\/revisions\/2179"}],"wp:attachment":[{"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/media?parent=2050"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/categories?post=2050"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/tags?post=2050"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}