Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unit test installers

Tags:

tdd

wix

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?

like image 852
stimms Avatar asked Oct 13 '09 21:10

stimms


3 Answers

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 successful build, install MSI on a clean virtual machine - if installation fails do something (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.

like image 116
Bartek Szafko Avatar answered Nov 16 '22 15:11

Bartek Szafko


Does it make sence, if you create some script file that checks that files are on the right places. I expect make it as perl or python script

test_installer_wix.pl

msiexec /x product.msi # remove
msiexec /i product.msi /silent # install

ASSERT_EXIST_FILE(PFILE, 'productname/application.exe')
ASSERT_REGKEY_EXISTS()

and etc.

like image 33
se_pavel Avatar answered Nov 16 '22 15:11

se_pavel


I want to add link to post about how to create unit test for WIX installer database: http://miroslawmiodonski.blogspot.com/2012/10/how-to-create-unit-test-for-wix.html

like image 2
mmiodzio Avatar answered Nov 16 '22 13:11

mmiodzio