Monday, June 16, 2014

API Testing

What is an API?
Application Programming Interface. It is an interface to make HTTP calls with REST or SOAP methods. Both methods can use JSON or XML as their input.

What involves API testing?
API Testing involves testing the response after making a API request. The request and response can be either support JSON or XML format.
It is different than GUI testing in the sense that you test for business logic here rather than concentrating on look and feel of the application.

What tools to be used for API testing?

For API testing, there are several free tools:
in chrome browser:
a) Postman extension:
b) Advance RESTClient extension:

in firefox browser:
a) Poster add on:
b) RESTClient add on:

from CLI(command line interface)
curl -v "http://[API call URL]"

What includes a proper API testing?
a) Planning your test cases meticulously - to include below points
b) Each parameters in a API request should be tested for boundary value analysis, null values, negative scenarios.
c) Every error code should be checked so that API code is smart enough to throw an error when encounters something un-expected in an API request.

What are the limitations of API testing?
a) No GUI to help testers with input values
b) A tester should have some coding knowledge
c) Request, response paramaters including error codes should be known to a tester
d) Validation of expected outputs and actual outputs are difficult for a tester to understand

How can API testing be automated?
You can use Jmeter to automate the API testing. Jmeter uses Java.

Sunday, June 16, 2013

Load Testing - Jmeter Vs Siege

- Jmeter comes with a GUI to create/run load tests, while Siege is command line tool
- Jmeter has tons for features that can be used while testing an entire website - with muliple pages, while Siege has limited options to be used
- Siege is fast to setup and run while Jmeter takes time to setup as it involves multiple steps
- Jmeter is faster to run for n concurrent users than Seige
- Jmeter has broad set of options for results analysis while Siege has one summary of results
- Seige is good for a quick load testing of a webpage while Jmeter is good for a wide variety of tests to be run at a single time
- Jmeter has several plugins to enhance its load testing features and analysis while Siege lacks in plugins
- Sometimes, Siege can give false results thinking better performance while Jmeter is quite accurate in its results

Hence, I prefer Jmeter in most of the load testing requirements, while I use Siege for a quick load test.

Saturday, June 15, 2013

Automation testing using TestComplete

For more than a year, I've been working on automation of functional testing, regression testing using TestComplete( It's a paid automation tool.

It's an little tricky to learn and use but quite similar to Selenium. You can use xpath, record and play to script test cases.

- similar to Selenium IDE, you can record and play test scripts
- similar to Selenium RC, you can create test scripts in VBScript, JScript, DelphiScript, C++Script or C#Script. (personally, I liked VBScript)
- Test results logs helps in finding precisely the issue where test failed
- tests can be recorded in keywork driven or screen capture modes
- tests can be created for regression, functional, DDT (data driven testing), ODT(object driven testing), and so on
- can easily do cross-browser testing

- automated tests can not be run on Mac OSX
- no support for mobile testing automation (though there is a package  'seetest' which can be integrated with TC)
- it can not read xpath values for browsers other than IE, Firefox, chrome, Safari.

Please read this book on TestComplete(reviewed by me): 

Tuesday, June 5, 2012

Browser cookies and its contents

Are you cookied? Tips to look for your cookies:

in chrome browser: chrome://settings/cookies, click on individual cookies to know its contents

in Firefox browser: options -> privacy -> remove individual cookies, click on individual cookies to know its contents

in IE 9: tools->internet options->general->settings->view files -> all files starting with cookie:

Tuesday, March 13, 2012

GooglePlay and its bugs

I found these bugs with Google Play:

1. Google Support page link from the Google Play has this JavaScript error(and the support page comes blank in Internet Explorer 8):

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Tue, 13 Mar 2012 20:00:17 UTC

Message: HTML Parsing Error: Unable to modify the parent container element before the child element is closed (KB927917)
Line: 0
Char: 0
Code: 0

2. In Google play, I see that while its uploading my music from Itunes, the music file number being uploaded is different from the one I see in the taskbar(screenshot shows file #88 while taskbar Googleplay icon says#92):

Friday, March 9, 2012

Time to say 'Goodbye USA'

It has been almost 8 yrs since I came to study in US. Now, after this long time, I'm excited because I'm going back to my home country- India on 23rd March.

It is time to say 'Goodbye USA' as I don't know if I will be back or not. Right now, I can only think of good memories of this country. It has been a long journey here as I got my MS degree, good job in NYC, my better half  and visited many beautiful places here. I learnt a lot of good things from this country and will always remember them and use them in India.

India has become a land of opportunity now with its booming economy with billion+ people and its billion possibilities in any field. Specially in the field of new businesses, its a hot market. A lot of startups are coming up everyday and indian market is so big that it can digest even more of them in future.

I see a lot of opportunity to work, invest, start something of my own soon in India.

Thanks to USA and I'm coming back, India!!

Friday, February 17, 2012

Mobile Testing on DeviceAnywhere and Gmail bug

These days I am testing some softwares on mobile phones/tablets/smartphones. I'm using DeviceAnywhere tool for this purpose.  DA is good tool to test softwares on mobile but it has several limitations. Like it has poor keyboard interaction and some keys don't work. Sometimes, you type something and something else gets written on mobile.

Other issue is bad graphics of mobile phones. Sometimes phone screens look blurry. Another issue is trying to navigate to the web browser on mobile phones. There is no step by step process or guide. It assumes you know the phone that you are testing on. This is ridiculous as nobody can know 2500+ models in the US market.

One more issue with DA is slow response time of its website or acquiring any mobile device. Slow response time is also evident during device's interaction.

In short, you got to have lot of patience to play with different devices on DA.

Today, I found a bug in Gmail on mobile phone. Try this:

1. Open gmail in iphone in safari browser with cookies enabled for it
2. Disable cookie in settings for Safari
3. Try logout from gmail, you will see that it does not let you, it takes you back to inbox page.