{"id":33785,"date":"2016-05-02T12:11:18","date_gmt":"2016-05-02T06:41:18","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=33785"},"modified":"2016-05-04T14:11:40","modified_gmt":"2016-05-04T08:41:40","slug":"jmeter-with-mobile","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/jmeter-with-mobile\/","title":{"rendered":"Jmeter with Mobile"},"content":{"rendered":"<p style=\"text-align: left;\">Jmeter is known for <a title=\"automated functional testing\" href=\"http:\/\/www.tothenew.com\/testing\/automated-independent-manual-testing\">Performance and Functional testing<\/a> tools for Web, but Jmeter can also record scripts for Mobile Applications. You can record and play script from Jmeter and quickly verify<a title=\"mobile app testing services\" href=\"http:\/\/www.tothenew.com\/testing\/automated-mobile-application-testing\"> Mobile application performance<\/a> and functional aspects. Jmeter has features to prepare and run our mobile specific performance test scripts. We need to do configuration on Jmeter and mobile devices, Find below mentioned steps to do configuration:<\/p>\n<p><strong>Steps to do JMeter proxy configuration:<\/strong><br \/>\n1. Open JMeter and right-click the TestPlan&gt;Add &gt;Threads (Users)&gt;Thread Group.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-33956\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/04\/11.png\" alt=\"1\" width=\"516\" height=\"271\" \/><\/p>\n<p>2. Right-click the Thread group&gt;Add&gt;Logic Controller&gt;Recording Controller.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-33957\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/04\/21.png\" alt=\"2\" width=\"469\" height=\"284\" \/><\/p>\n<p>3. Right-click the Threads&gt;Add&gt;Listener&gt;View Results Tree.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-33958\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/04\/3.png\" alt=\"3\" width=\"492\" height=\"295\" \/><\/p>\n<p>4. Add test script recorder by selecting Add&gt;Non-Test Elements&gt;HTTP(S) Test Script Recorder option.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-33959\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/04\/4.png\" alt=\"4\" width=\"472\" height=\"241\" \/><\/p>\n<p>5. Add \u20188080\u2019 as Port value and click the Start button. This will start the JMeter proxy on localhost.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-33960\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/04\/5.png\" alt=\"5\" width=\"504\" height=\"237\" \/><\/p>\n<p>6. On clicking the \u201cSTART\u201d button you may get some Root CA Certificate message dialogue. Just click the \u201cOK\u201d button to get rid of it.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-33961\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/04\/6.png\" alt=\"6\" width=\"521\" height=\"284\" \/><\/p>\n<p>These were the configurations we need to make in JMeter in order to record the scripts. Now, we need to set up the JMeter proxy in mobile devices so that all mobile requests will be recorded in JMeter. Follow the steps mentioned below to set up proxy in android and iOS platforms.<\/p>\n<p><strong>Android proxy configuration<\/strong><\/p>\n<p>1. Go to Settings&gt;Wi-Fi option(WiFi network should be same for both Mobile and Laptop\/Desktop).<br \/>\n2. Long tap the connected network and click the \u2018Modify Network\u2019 option.<br \/>\n3. From the opened dialog box, check the \u2018Advanced options\u2019 check box.<br \/>\n4. This will open advanced settings from which we can modify proxy manually. For this, set \u2018Proxy\u2019 option to \u2018Manual\u2019.<br \/>\n5. Now, set \u2018Proxy hostname\u2019 as your computer\u2019s IP address and \u2018Proxy port\u2019 to 8080 as we have set up in JMeter configuration. Refer the below image to get an idea about this setup.<br \/>\n6. Click \u2018Save\u2019 option. You can now start running the application on your mobile device and its requests will be recorded in JMeter.<br \/>\n<strong>iOS proxy configuration<\/strong><\/p>\n<p>1. Go to Settings&gt;Wi-Fi option.(WiFi network should be same for both Mobile and Laptop\/Desktop).<br \/>\n2. Click on the connected network.<br \/>\n3. Select the \u2018Manual\u2019 option from HTTP Proxy section.<br \/>\n4. Set the \u2018Server\u2019 value as your computer\u2019s IP address and \u2018Port\u2019 value to 8080 as JMeter configuration.<\/p>\n<p>5. But, before running any application, make sure that you click the \u201cStart\u201d button on HTTP(S) Test Script Recorder screen in JMeter.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-33962\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/04\/8.png\" alt=\"8\" width=\"506\" height=\"247\" \/><\/p>\n<p>6. You can now start running the application on your mobile device and its requests will be recorded in JMeter.<br \/>\n7. On clicking the \u201cSTART\u201d button you may get some Root CA Certificate message dialogue. Just click the \u201cOK\u201d button to get rid of it.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-33963\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/04\/61.png\" alt=\"6\" width=\"521\" height=\"284\" \/><\/p>\n<p>8. Once you start running your application, the steps of the script will be recorded under \u201cRecording Controller\u201d. See the screenshot below:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-33964\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/04\/9.png\" alt=\"9\" width=\"516\" height=\"283\" \/><\/p>\n<p>9. Once you are done with the recording of all steps of the test case, stop the script by clicking the \u201cStop \u201cbutton at \u201cHTTP(S) Test Script Recorder screen in JMeter.<\/p>\n<p>10. Expand \u2018Recording Controller\u2019 and see all the recorded steps are displayed.<\/p>\n<p>11. Now click the \u201cPlay\u201d button displayed in green.<\/p>\n<p>12. Click the \u201cView Result Tree\u201d.<br \/>\n13. Here you will see the execution result of your script.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Jmeter is known for Performance and Functional testing tools for Web, but Jmeter can also record scripts for Mobile Applications. You can record and play script from Jmeter and quickly verify Mobile application performance and functional aspects. Jmeter has features to prepare and run our mobile specific performance test scripts. We need to do configuration [&hellip;]<\/p>\n","protected":false},"author":867,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":28},"categories":[1818,1817,1772,1],"tags":[3301,3303,3302,3300],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/33785"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/867"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=33785"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/33785\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=33785"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=33785"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=33785"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}