Friday, February 19, 2016

Jmeter - Http Asking Defaults Config Element

| Friday, February 19, 2016
HTTP Request Defaults is 1 of the jmeter configuration element. You tin laid default values for HTTP Request controllers using HTTP Request Defaults inward your software charge evidence plan. Let's say, You convey software charge evidence innovation amongst x HTTP requests as well as all requests are beingness sent to same server. In this case, You tin add together HTTP Request Defaults as well as laid server elevate in Server Name or IP champaign of HTTP Request Defaults. Then you lot practice non take away to laid Server Name or IP inward all x HTTP requests. HTTP requests volition inherit Server Name or IP field's value from HTTP Request Defaults. Let's run across how it industrial plant amongst practical example.

Add HTTP Request Defaults In Software Load Test Plan
You tin add HTTP Request Defaults parallel to asking or controller. For adding HTTP Request Defaults nether Thread group,
  • Right click on Thread Group -> Add -> Select Config Element -> HTTP Request Defaults. See bellow given image.

It volition add HTTP Request Defaults nether Thread Group.

Example : Using HTTP Request Defaults In Jmeter Software Load Test Plan
I convey prepared sample jmeter software charge evidence innovation to demo you lot how HTTP Request Defaults genuinely industrial plant as well as when to move it.

I convey evidence innovation amongst 3 HTTP requests(/index.html, /site/contact.html as well as /site/guidelines.html) as well as all 3 requests are beingness sent to same server jakarta.apache.org. So i volition add HTTP Request Defaults inward my evidence innovation as well as laid Server Name or IP = jakarta.apache.org every bit shown inward bellow image.


Now inward all 3 HTTP requests, I take away to laid alone remaining path. Server elevate volition hold upwardly automatically inherited from HTTP Request Defaults inward all 3 HTTP requests every bit shown inward bellow image.


You tin run across that i convey non laid server elevate inward whatever of the request. So server elevate volition hold upwardly inherited automatically from HTTP Request Defaults when you lot run evidence as well as practice amount URL of page. See consequence bellow.


All 3 requests are pass. Also you lot tin run across that it hahs created amount URL(Server elevate + Path) of index page.

This agency you lot tin use HTTP Request Defaults inward your software charge evidence plan.
<< PREVIOUS || NEXT >>

Related Posts