{"id":5244,"date":"2015-12-09T19:39:10","date_gmt":"2015-12-10T00:39:10","guid":{"rendered":"http:\/\/appcrawler.com\/wordpress\/?p=5244"},"modified":"2015-12-13T08:20:45","modified_gmt":"2015-12-13T13:20:45","slug":"extracting-post-arguments-from-fiddler-for-jmeter","status":"publish","type":"post","link":"http:\/\/appcrawler.com\/wordpress\/2015\/12\/09\/extracting-post-arguments-from-fiddler-for-jmeter\/","title":{"rendered":"Extracting POST arguments from fiddler for JMeter"},"content":{"rendered":"<p>You can filter on your domain by clicking filters in the top right hand corner row of tabs in Fiddler, then add your domain and click run filterset now in the &#8220;Actions&#8221; dropdown box.<\/p>\n<p>After running your requests in your browser, you should see something similar to what is below&#8230;<\/p>\n<p><img alt='' class='alignnone size-full wp-image-5247 ' src='http:\/\/appcrawler.com\/wordpress\/wp-content\/uploads\/2015\/12\/img_5668c7fcaf24a.png' \/><\/p>\n<p>You can save the output to a text file by clicking the ones in which you are interested, then right clicking the selecting and save as test, as shown below&#8230;<\/p>\n<p><img alt='' class='alignnone size-full wp-image-5248 ' src='http:\/\/appcrawler.com\/wordpress\/wp-content\/uploads\/2015\/12\/img_5668c86fb89a0.png' \/><\/p>\n<p>With the resulting text file, you can run the python below to generate a file that can be used to paste into the JMeter UI for POST arguments.<\/p>\n<pre>\r\nimport re\r\n\r\nURL=\"\"\r\nfor lne in open(\"your_fiddler_file\",\"r\"):\r\n\u00a0 if re.match(\"HTTP\/1.1\",line) and len(tmp) > 0:\r\n\u00a0\u00a0\u00a0 l = URL.split(\"\/\")\r\n\u00a0\u00a0\u00a0 if URL != \"\" and re.match(\"www.yourtestdomain.com\",l[2]):\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 print METHOD,URL\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 m = tmp.split(\"&\")\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 if len(m) > 1:\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 print \"#cut and paste the tab delimited post parameters below into the post variables section of your JMeter plan\"\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 print \"#for the URL above\"\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 for i in m:\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 n = i.split(\"=\")\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 print n[0] + '\\t' + n[1]\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 print \"------------------------------------------------------------------\"\r\n\u00a0 elif re.match(\"^POST\",line) > -1 or re.match(\"^GET\",line) > -1:\r\n\u00a0\u00a0\u00a0 METHOD = line.split(\" \")[0]\r\n\u00a0\u00a0\u00a0 URL = line.split(\" \")[1]\r\n\u00a0 tmp = line\r\n<\/pre>\n<p>Generally, I have found this to be the most reliable way to record a test, even when compared to the JMeter script recorder as well as WebSite Pulse (which is still pretty good).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can filter on your domain by clicking filters in the top right hand corner row of tabs in Fiddler, then add your domain and click run filterset now in the &#8220;Actions&#8221; dropdown box. After running your requests in your&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"http:\/\/appcrawler.com\/wordpress\/2015\/12\/09\/extracting-post-arguments-from-fiddler-for-jmeter\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"footnotes":""},"categories":[65,64],"tags":[],"_links":{"self":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/5244"}],"collection":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/comments?post=5244"}],"version-history":[{"count":7,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/5244\/revisions"}],"predecessor-version":[{"id":5257,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/5244\/revisions\/5257"}],"wp:attachment":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/media?parent=5244"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/categories?post=5244"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/tags?post=5244"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}