Geeks With Blogs
Adventures of a Setup Developer my musings about setups and other things in my life

I was recently reading the article by Marting Fowler on Continuous Integration. Our team has set process to have daily builds of the MSI package along with the binary builds. It would have been an easier task with the WIX Toolset but most of our code still is in InstallShield DevStudio. We have used the InstallShield Standalone Build environment to build our MSI package as a batch job. We have various build machines to build different parts of the software and the Standalone Build environment helps us achieve this process without bleeding for separate licenses. As Marting Fowler had suggested, a successful build is just not a build without errors, it should be a workable output which clears some basic tests. I wondered if we could implement the Test First approach suggested by XP as a part of the MSI Build Process. The test first approach requires you to write self testing code which does some basic smoke tests. These are called unit tests or Build Verification Tests. I am sure that most developers include such code in their applications but I have not heard of such tests for Installation programs especially MSI packages.

I had blogged earlier on how the WIX Toolset can be used for distributed development. It is really cool that the WIX Toolset can avoid building merge modules, when they are not really required. But as we currently do not have much choice regarding this, we do build different projects as merge modules and later integrated them into the main project. Thus, technically our unit tests are integration tests.

A successful installation is not just an installation without errors. A successful installation should install the desired set of features and components. So, their states should be checked. This would involve parsing the verbose log file generated. The .NET Regular Expressions helps very well here <grin/>. We can check for the action return values and the feature and component installation states from the log file. Additionally, after installation, the files and registry entries on the target machine can be compared to the files and registry entries in the MSI package for the components that are marked installed. This can be done by comparing an uncompressed build or an administrative image with the files on the target machine. These criteria have a greater impact during upgrade than the first time installation.

I am just toying around with this idea and not really sure if it would be feasible for complex upgrade scenarios. I will post followups if I get anywhere with this. <smile/>

Posted on Thursday, March 17, 2005 8:54 AM Setup | Back to top


Comments on this post: Unit Testing MSI Packages... Maybe

# re: Unit Testing MSI Packages... Maybe
Requesting Gravatar...
Left by PTremblay on Apr 10, 2005 5:56 PM

# re: Unit Testing MSI Packages... Maybe
Requesting Gravatar...
InstallShield's PreDeployment Testing does the testing on the MSI package before actually installing the package.
more here
http://www.installshield.com/products/adminstudio/info/featuredetail.asp?fv=3&FeatID=479
Left by Ravneet on Apr 14, 2005 6:59 AM

Your comment:
 (will show your gravatar)


Copyright © Vagmi Mudumbai | Powered by: GeeksWithBlogs.net