Tuesday 2 December 2014

Steps to configure Rest Services in Jmeter




Rest/Restful services Testing using Jmeter.

Representational state transfer (REST) is an abstraction of the architecture of the World Wide Web; more precisely, REST is an architectural style consisting of a coordinated set of architectural constraints applied to components, connectors, and data elements, within a distributed hypermedia system. REST ignores the details of component implementation and protocol syntax in order to focus on the roles of components, the constraints upon their interaction with other components, and their interpretation of significant data elements.

Steps to configure Rest Services in Jmeter

1.       Add Thread Group to your Test plan. 

2.       Right click on thread group and add  Config element--> HTTP Header Manager.

 


3.       Configure the “Content-Type” as “application/json” 
 

 


4.       Now Right click on thread group add sampler à HTTP Request Defaults. 


 


5.       Now configure the HTTP request details in the HTP request Defaults. 

 




The server/IP name:  It can be Server IP of your request or localhost
Port Number: It is the port server is accessing.
Path: It is the path name
Parameters: If the request has some parameters, then they can be specified, else left blank.

6.       Now add a listener to view the results. Right click on the thread group à add listener à add view result tree. 

 



7.       Now save the test plan and run the script.
8.       View the results in View Result Tree.

 

No comments:

Post a Comment