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.

 

Monday, 1 December 2014

Data Driven Framework in Selenium Web Driver using Junit

Data Driven Framework in Selenium Web Driver using Junit

Frameworks help to structure our code and make maintenance easy. Without frameworks we will place all our code and data in same place which is neither re-usable nor readable. Using Frameworks, produce beneficial outcomes like increase code re-usage , higher portability , reduced script maintenance cost etc.


Steps for creating Data Driven Framework in Selenium using Junit

3.       Identify the scenarios to be automated.
a.       Java Basics
b.      Java Oops Concept
5.       Start building a basic Project structure
7.       Create an Config file for storing URLs
9.       Create a utility file
b.      Screen shot utility
d.      Emailing Test Result
11.   Email Reports
b.      Zip HTML reports
c.       Email Zipped Reports
13.   Maintenance of Test