Friday, August 20, 2010

Knowing the bug

Testing involve many activities like finding issues,reporting status,exploring,understanding  your application and may be more. Among all I personally like  debugging or troubleshooting the bug. Some people might say that it is not tester's job and tester's job is to just report the issue. I don't want to argue on that but I would like to say that knowing and finding root cause of bugs help me in following ways,

-That experienced can be used when you test similar set of application.
- If you are aware that you are going to hit same bug with newly design feature, you can very well give your input at design time.
-You will get to know more about internals of AUT, which will help you to isolate bugs  and make your bug report stronger.

I love to find the root cause of bugs  before reporting the bug. I have developed some debugging experience  but if some new features going to come I always like to question developer. Question will be "How they will go about debugging if they found some bug in the new feature". We can use that information as much as possible until it is not that related to code debugging. I would like to put some debugging experience with web application which can be used in general. I also use this technique to isolate bugs. Suppose you hit issue while testing web based application.

-First thing will be to divide it in two parts. Issue can be either server side issue or client side issue .
Server side debugging can be started started with server logs. There can be two types of server logs for web based application
  • Web Server logs :-Sometimes these logs are useful to identify what type of HTTP request is coming to server. There are status code for each type of HTTP response, So if your application works over HTTP then status code can help you to check if every request coming from client is fine. You can make out from this logs that issue is client side or server side.
  • Application server logs :- Logs generated by application and often Application server  logs + Web server logs are combined to form one log. Logging in debug mode helps to find out any exception or error. Exceptions throws stack trace, which highlight origin of error. You can follow the stacktrace and if you have little bit idea of the code you can find the actual root cause of issue.
If you cannot find issue in server side then you can try debugging in client side.For web based client side application you will find most issues related to javascript.To debug that
-Firefox has Error console or you can use Firebug as Firefox extension, which gives fare amount of understanding of script errors.
-Chrome comes with embedded developer tools for debugging javascript errors.

It is always good to question your developers about debugging. Tester are the one to see the issues in first place, so they can be one of best person to debug and this can help you avoid getting "bug not reproducible" responses  from development.

Wednesday, August 4, 2010

Browser compatibility what i understood

Now a days most of desktop based application moving towards web based. I guess everyone sometime or other get to test web applications.

Assuming your web AUT(application under test) has lot of features which will result in huge number of testcases.  Let's say  AUT has hundreds of testcases as it has been the case for me, most of time. Basic requirement for test team is to make sure all features works fine on every web browser we support. Best way to achieve this is to run every testcase on every browser which will be an exhaustive way. I really don't like this way and I feel there should be a way to optimize this. Validating your web application for all web browser is callled cross-browser compatibility thats what i am going to focus on .

From my experience what  I have discovered is that there are two areas where behavior of your application changes from browser to browser. If I concentrate on those two areas then I can optimize  on testing for browser compatibility.

 Those areas are
  1. CSS 
  2. Javascript
  • CSS  is guidelines which tells browser how to display your page. These guidelines are stored  in a file( with .css extension) with web pages.There are standard for these guideline but different browser interpret these files differently, which causes your web pages  to display incorrectly. Most common issue you will find  due to CSS are,
    • label size not proper.
    • Text font vary across browser.
    • pop-up menu does not render properly. In general you can say all UI rendering issues.
         To find CSS issues,
    • navigate through  all pages/dialog box  and popup menus  on your web application.If there is any UI problem  due to CSS  you will easily observe it .
  •  Javascript is scripting language for browsers  to perform some dynamic operation on browser.Usually inputs given by user can be processed immediately on browser itself rather getting it processed from server .Every browser has there own javascript engine and browser sometimes fail to execute these javascripts in runtime.  Issues mostly due to javascript  are,
    • WebElements(links,buttons and images etc ) calling javascript does not work at all
          To find issues related to javascript,
    • Test all links which call javascript or uses javascript in some way .You can use developer tool like firebug .Firebug is add-on to firefox which helps you see internal of web pages you are browsing

According to me, if you attack these two areas you  can optimize on browser compatibility and avoid  running every  testcase on every browser.