Hello Cinjuggers,
We are working with a client who has multiple J2EE projects under WAS.
They want to be able to do functional testing of those applications
with different "Current SYSTEM_DATE" then the actual SYSTEM_DATE for
some functionality. To explain this lets say today (i.e. on
03/21/2005) Tester A wants to test Application APP_A with current
system date as "01/01/2005" a the same time Tester B wants to test
APP_B with system date as "02/24/2003" in same WAS test environment.
To accomplish it right now they are modifying the SYSTEM_DATE at OS
level and testing their applications. But it is causing lot of problem
to the other application on that server. Also this does not allow them
to test multiple applications at same time with different system
dates.
To resolve the problem we are suggesting them to add abstraction
layer, which based on Production or test environment will return
actual system date or configured test SYSTEM_DATE. All the application
will have to use this layer (may be Singleton object) to get current
system time. This singleton object will also save different current
time for different applications so that they can be tested separately.
Is this the right way to solve this problem? Is there are other option
available with minimal performance impact? Has anyone faced similar
problem earlier? Any pointer will be greatly appreciated.
Thanks a lot in advance,
Keshav.
|