views:

28

answers:

2

As part of our nightly build on windows, an installer package is created using NSIS. I would like to automatically test the "correctness" of the installer.

This might be things like:

  • Checking the platform of dll files.
  • Checking the install folder.
  • Testing the uninstall function doesn't leave any files behind.
  • Checking registry keys are created in the right location.

Are there any tools or techniques that could help me achieve this?

+1  A: 

We use VMware machines for this (any other virtual machine works fine, too). Along with http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx to see the system changes made by it.

However, that is a semi-automatic process. I guess it can be fully automated, but we do not need it.

Ruby8848
@Ruby8848: can you elaborate on your second paragraph? Do you run your installer in a VM and then eyeball the results from Process Monitor?
ngoozeff
Exactly. With process monitor we verify that (only) the right places get changed on install and uninstall. But as I said, that is a semi-automatic process. We do not do it daily, but only with public beta and release builds (about 1-2/months).
Ruby8848
+2  A: 

I don't think VM's or automated processes to push the package to the VM is an answer in itself. The real problem here is 'How do you know the integrated / deployed product will work?' I think the only answer to that question at this point would be to then have automated processes to test the application itself in the deployed state.

Christopher Painter
@Christopher: You make a number of good points. But there are a number of cases where the application will run when it should not, eg WoW64. Also the application does usually care if it can be uninstalled correctly or not.
ngoozeff
True. Windows Installer has the concept of validation. It doesn't actually run the installer, it just checks the MSI database for issues using a series of ICE's ( unit tests ). I will say in my experience the declarative nature of MSI lends itself to very predictable behavior. Especially if you avoid writing custom actions and run your validation.
Christopher Painter
Still, this validation doesn't answer the question of 'will it work? did I deploy the right things?' I have yet to find a simple solution to this problem.
Christopher Painter