Views of a Passionate Tester...

Wednesday, October 19, 2011

Search by POST method–A small research

This post is based on a small research I have done on Mozilla Firefox Search Plug-in.

Searchbar

The research started with the study of cookies stored by Mozilla Firefox and moved towards building the Mozilla Firefox Search Plug-in for my blog. My research is not finished yet but still I would like to share an opportunity I found testing these Search Plug-ins.

Testing Nook

While exploring these search plug-ins I noted that every search plug-in is using GET method to send the search query to Search Engine. It seems fine to me as it is just a search so using POST method to send the request doesn’t make a sense to me, but then I thought other way – What would happen if POST method is used to send the request to server. I got curious about this and start to edit the properties of these plug-ins. I have tested multiple search plugins to see how corresponding search engines handles the request sent by POST method and found these three different behaviours:

Google: Google was first search plug-in I tested. When I sent search request to Google using POST Method, I got an error page like this:

Error 405 (Method Not Allowed)!!1 2011-10-18 20-08-21

It seems appropriate. Google doesn’t serve any search request being send by POST Method but then a question is raised - does a non technical user really understand what is POST method? For eg.: My wife doesn’t know this terminology and she will definitely call me for help if she get such error from the Google.

(See the Error Code 405. I have not seen this error earlier. So my research also helped me to find a new error message Winking smile)

Yahoo: The next search engine was Yahoo. Initially I thought that Yahoo will give the same result as given by Google but it proved me wrong. To my surprise Yahoo has given the result for the search query I sent using POST method.

Hello - Yahoo! Search Results 2011-10-18 20-11-15

Bing: The third major search plugin which I tested was Bing – A Microsoft Product. I love my job because it surprises me and it surprises me daily. Till now I have tested two major search engines Google and Yahoo dealing with the request sent using POST method and both of them have given me different results. Once again I was guessing the result before testing. Based on my two previous results I was thinking that Bing should either display the error message or it should display the search result. I have not thought of any other result but surprisingly, Bing has given some unexpected result:

Bing 2011-10-18 20-20-39

Instead of displaying search results or any error, it has opened Bing Search Engine.

I have tested for few other search plugins for different search engine but result are more of the same as these three. Now, question is which search engine has served the user’s request properly: Google, Yahoo or Bing. Think as a tester, Think as a developer and Think as an end user.

Post me your answers with the reason in Comments section, we can have a good discussion on it.

Rate This:

1 comments:

Sarwar Jahan said...

Hi Mohit,

After reading your experience about search engines, I have come to the following conclusion:

* As End user, I'll vote for yahoo which serves my request irrespective of the method (GET/POST) used.

* As Developer, I'll vote for Google because POST is used for submitting some data to the server and not for retrieving data (GET is used for this purpose). And google is throwing the proper error message to end user. But end user who doesn't know about HTTP methods will get confused by getting the error message.

* As Tester, It depends on situation and scenarios. Google is throwing proper error message, so its ok.
Bing search plugin is not able to serve the search request so its redirecting to Bing Search homepage so that End user can search again (Now you cannot change the HTTP method) and it will serve the request successfully. So Bing is also OK.
But Yahoo is not bothered about the HTTP method and gives the result. So I think Yahoo's search engine should be tested properly. There may be some defect, or it may be according to their business logic.