tags:

views:

73

answers:

2

I am starting to do some installer work using WiX (yay, not Installshield) and I was hoping to do some TDD of the installer. Does anybody know of an easy way to do this?

+1  A: 

It sounds to me more like an integration test than TDD.

As far as i can tell there are no msi testing suits per se.

Nevertheless you could try something like this ( assuming you have a contiunous integration server): 1. after successfull build, install msi on a clean virtual machine - if installation fails do sth (mail, ticket, whatever) 2. run whatever integration tests you have on your project.

After that you can be sure that installed application does what it should.

Bartek Szafko
A: 

It might not be a bad idea to run a few standard tests on a generated MSI. MSI files support a lot of different deployment scenarios: admin install to extract files, advertised install for active directory, silent install, maintenance install, uninstall etc... Maybe it is indeed an idea to create a small test suite for this - perhaps it's even being considered for the WIX toolset for all I know.

However, I think the first, best step towards delivering a quality setup would be to run the MSI through the MSI validation suite. These are referred to as ICE (Internal Consistency Evaluators) and they are delivered as *.cub file with the Windows Installer SDK. Running these scripts tend to reveal lots of bad design constructs in the MSI. The WIX tool for this is called smoke.exe.

Glytzhkof
I think there is no need to call smoke explicitly. Light runs ice test in darice.cub and mergemod.cub(when needed) http://installing.blogspot.com/2006/04/msi-validation-in-wix.html
Bartek Szafko