HTTP (’A Beginner’s Blog to Performance testing’ continued…..)
By Happy Himanshu Gupta
As I read more on Performance testing, I thought of going on a practical application to test my college website. The search results on Google presented the name of an open-source performance testing tool named OpenSTA. It was not difficult to get familiar with the interface of the tool and I began with what is called as script recording of the application.
After the recording was complete, I opened the script to see how it actually looks like. You know guys, something more horrible than any general software code appeared on the screen, and I had never read such kind of a text before in any of my course books. It was then I realized that something more important needs to be learned, before I play around with performance measuring tools. The concept I missed out reading was HTTP, the global language of web.
Most of us open our mailbox daily and go through a number of other websites. But do we ever think, what helps us in accessing our mails and the unlimited information around the globe. Well, I never thought of it, before this question actually struck me a few days ago. Is my dumb machine intelligent enough to obey my orders every time I ask it to do so? Well friends lets now understand the way the computer listens to our request and returns back the response.
HTTP which stands for “Hypertext Transfer Protocol” is a common language which lays the path of communication for all the web clients, servers and the related web applications. HTTP Clients and HTTP Servers together make the basic component of the World Wide Web (www).
The browser that we use every day is the one that plays the role of a web client. When we wish to access a page, say, www.google.com, the browser sends an HTTP request to the server (web server) www.google.com sitting at the backend. On accepting the request, the server, makes a search for the desired object/page. On a successful search it returns back the object to the waiting browser in the form of an HTTP response.
The content that transfers over the web is composed of various Resources. The web content can be as simple as a static file. These files are composed of images, html content, video contents, movies, word files etc. The web content also has the dynamic resources which are generated on demand.
Now, the question that comes to my mind is how to locate these resources on the World Wide Web. The Uniform Resource Locator (URL) is the most common form for resource identification on www. The descriptive format of the URLs, tell us the way to fetch a resource from some particular location on the server.
Now let’s take a look at the concepts of HTTP request and response messages. The messages which are sent from web clients to web servers are called request messages. The response which the web client receives from the server is called response message. The structure of response and request messages is almost similar. HTTP messages are composed of three parts primarily: Start Line, Header Fields and Body.
Start Line:
All HTTP messages begin with a Start Line. The Start line for the request messages contains information which asks the server to do something to the resource. It contains a method which describes the function that the server needs to perform on the resource described by the URL. Similarly in a response message, the start line conveys back the status information and any resulting data to the client, thus completing the operation.
Header Fields:
HTTP headers just add more info to the request and response messages, appending after the start line. They are basically the name-value pairs that give additional info about the message being transferred. A simple HTTP header has the following syntax: a name, followed by a colon (:), followed with whitespace (optional), followed by the field value, followed by a CRLF.
Body:
The HTTP messages were actually designed to transfer this part of the message, which carry varied kinds of digital data. Images, videos, html documents, software applications, e-business applications, e-mail applications and so on, all form a part of the arbitrary binary data contained in the HTTP body. Of course, the body can also contain text.
Friends, I would recommend you all to read more on HTTP, and explore the terms better. I personally find it interesting and a rich source to understand the areas of World Wide Web which are difficult to comprehend. HTTP also forms the core for performance testing of any web application.
I will continue with a few left over headings covered under HTTP, in my next blog. Till then, happy reading… :)
http://www.qacampus.com
http://www.crestech.in
http://www.crestechsoftware.com.au
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment