Java Code Geeks

Sunday, September 28, 2008

Rule based engines to automatically validate upgrades

It is a headache for install/upgrade developers of an enterprise application, to make sure their product will install/upgrade properly at the customer site. By nature, enterprise applications are far more complex than a simple product because of their distributed nature and different varieties of setup that these enterprise applications usually provide. Now software by nature can fail anywhere as we do not have prior knowledge of the system where it will be installing. For a simple example, we might be having an application which is installing fine on the developers and testers boxes but fails at the customer location just because customer had many "non-active" logical volumes !! which we do not usually have.
So in summary, it is not possible to make sure the product with lot of third party integrations/dependencies will really install properly. One way to attack this problem is to produce a framework which will run before and after the install/upgrade of your application and will make sure that 1) the system is ready to install your application (by checking all pre-requisite patches, third party product versions etc) and 2) perform some basic sanity test of the product after install.
Thinking about it, is not very complex with Java and XML. Lets say developer publish one XML schema where in one can put in "several test" and the output to be looked for in that result is a good idea.

For example, lets say your product X depends upon Oracle version 10g. Now you create one sql file which selects the oracle version from v$version and you mention in the XML rule file to run this sql file and check for a regular expression like "". Your framework can run and check for the proper oracle version. Like this a series of "tests" can be performed using this framework.

The beauty of this solution is, as and when you find more failure conditions of your install/upgrade, you can add more tests in your XML based rule file and make the product more failure proof.

No comments: