No doubt software testing is a great challenge in SDLC. To get a clear picture of your testing application you must have proper preparation in proper time and you have to execute all those preparations in proper time and proper places. On the other hand all the plans, hard works regarding software testing will be in vain if testing is not done in proper Test Environment.
In my professional experience I had found some bugs that were bugs because of not testing the application in proper test environment. Similarly I have missed some bugs that were because of not testing the application in proper test environment.
Proper test environment is not an easy term to understand. A proper test environment may relate hundred of tasks to do before testing any application. Here are some of them:
> Application is built from proper SVN revision?
> Application is installed/deployed in proper way?
> In which OS the application is running on? What version is it?
> In which Browser it is running? Version?
> It is running where? Location, time, timezone, daylight saving?
> and so on………………..
Very recent I was missing a bug because of improper test environment. A desktop application runs mainly in USA, it communicates with server DB through web services. The application is used by many users from several places of USA. Recently two date fields are added in it. The DB columns for these fields are of type Date, so it doesn’t consider Time/Zone related information.
In the mean time client complained us that many times they saw different dates than they provided for those fields. So I started to investigate the problem, executed different scenarios but couldn’t reproduce the bug. I tested the application both in local and live environment. The dates are selected from a calendar control and these are properly saved in DB server. Since the data type was Date so I thought there won’t be any TimeZone issues.
Just for curiosity I set different TimeZonse in my application running machine and server running machine and then started code debugging. From web service the data were returning to client side through a DataSet. When the data are assigned into a DataTable in client side then I wondered to see the return values in different environments. Here are the environments and return values:
Environment #1:
a) App in Local PC (Time: 14:50, Time Zone GMT +6)
b) Webservice in Live PC( Time: 03:50, Time Zone GMT-5)
c) Original Start Date=12/05/2010 and End 12/11/2010)
d) Now the DataTable have Start Date=12/05/2010 11:00:00 AM, End Date=12/11/2010 11:00:00 AM.
e) So Start Date and End Date are showing as 12/05/2010 and 12/11/2010.
Environment #2:
a) App in Local PC(Time: 15:01, Time Zone GMT -5)
b) Webservice in Live PC( Time: 04:01, Time Zone GMT -5)
c) Original Start Date=12/05/2010 and End 12/11/2010)
d) Now the DataTable have Start Date=12/05/2010 12:00:00 AM, End=12/11/2010 12:00:00 AM.
e) So Start Date and End are showing as 12/05/2010 and 12/11/2010.
Environment #3:
a) App in Local PC(Time: 15:01, Time Zone GMT +13)
b) Webservice in Live PC( Time: 04:01, Time Zone GMT -5)
c Original Start Date=12/05/2010 and End 12/11/2010)
d) Now the DataTable have Start Date=12/05/2010 06:00:00 PM, End=12/11/2010 06:00:00 PM.
e) So Start Date and End Date are whowing as 12/05/2010 and 12/11/2010.
Environment #4:
a) App in Local PC(Time: 04:10, Time Zone GMT -5)
b) Webservice in Local Newtwork( Time: 04:01, Time Zone GMT +6)
c) Original Start Date=12/05/2010 and End Date 12/11/2010)
d) Now the DataTable have Start Date=12/04/2010 01:00:00 PM, End=12/10/2010 01:00:00 PM.
e) So Start Date and End Date are showing as 12/04/2010 and 12/10/2010 respectively. And this was the bug in different TimeZone.
Later I knew that whenever Date/Time related information are passed/retrieved to/from web service through DataSet/DataTable then it automatically adjusts time with TimeZone in SOAP XML [see here].
I couldn’t reproduce the bug if I had all things right except the different TimeZone. So this is how it is important to test application in proper environment.