Types of Response Codes
Hi Everyone,
Being part of smartOCI team I thought to share with everyone how can one test a webservice where there is no UI involved, but to start with I will just explain the Response Codes here.
Although there are different tools available out there, SOAPUI and HTTP Requester are the most popular.
Currently the QA Team is using HTTP Requester, we have not used SOAPUI but I did install it once to get its feeling.
First of all to test a webservice one should know what kind of HTTP request methods are there and what are the most popular response codes.
What is a request?
Request is sent to the server whenever an action is done by a user, e.g. clicking login button after entering username and password will send a request to the server.
There are different HTTP Request Methods but the most popular ones are GET and POST, I’ll try to explain them here but there are many references on the internet, so just GOOGLE it if you don’t understand my explanation 🙂
In POST request all the parameters with their values are part of the request body which is created according to the content type and the parameters are not visible, whereas in GET method the parameters are appended next to the URL or the address of the service with a “?” and each parameter is separated by “&”
What are Response Codes?
Whenever a request is sent to the server it will send some response. There are some response codes which specify whether the response was success, fail or some other error. During the testing of a web application, you must have seen some exceptions in the web browser, most of them are 500, 503 or 404. One must be familiar with these errors, secondly custom error pages are also designed based on the error response code. Some of the codes are:
- 200: This is a success response
- 503: The server is down e.g. Tomcat Service is not running
- 404: Server responded with an error, either there is some error in the syntax of the request or server was not found on the address
To test a webservice one should know about the response codes as it will identify whether your test case passed or failed. Obviously one cannot remember all response codes, you can go to the URL below for all Response Codes and their description
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
I hope this was helpful, I wanted to share what I know as we don’t get much to learn in Black Box Testing. Although I am no longer in QA but I tend to miss the technical stuff and try to keep myself up to date with latest trends of the market and will try to share whatever I learn.
I’ll post something about SOAPUI if I get some time out to learn it. Although it is open source, anyone can download and use it.
Cheers,
Sheharyar!
This post was viewed (111) times.
EA server JVM memory enhancement configuration Using JvisualVM for Monitoring Memory Utilization
Good post for beginners. Thanks Sheheryar, I hope you stay active on this blog 🙂
Oh n by the way, I have moved your post from UNCATEGORIZED to APPLICATION SERVER category.