Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Existing solutions to test a NSIS script

Does anyone know of an existing solution to help write tests for a NSIS script?

The motivation is the benefit of knowing whether modifying an existing installation script breaks it or has undesired side effects.

like image 298
brian_d Avatar asked Feb 10 '11 17:02

brian_d


2 Answers

Unfortunately, I think the answer to your question depends at least partially on what you need to verify.

If all you are worried about is that the installation copies the right file(s) to the right places, sets the correct registry information etc., then almost any unit testing tool would probably meet your needs. I'd probably use something like RSpec2, or Cucumber, but that's because I am somewhat familiar with Ruby and like the fact that it would be an xcopy deployment if the scripts needed to be run on another machine. I also like the idea of using a BDD-based solution because the use of a domain-specific language that is very close to readable text would mean that others could more easily understand, and if necessary modify, the test specification when necessary.

If, however you are concerned about the user experience (what progress messages are shown, etc.) then I'm not sure that the tests you would need could be as easily expressed... or at least not without a certain level of pain.

Good Luck! Don't forget to let other people here know when/if you find a solution you like.

like image 192
Richard J Foster Avatar answered Sep 21 '22 06:09

Richard J Foster


Check out Pavonis.

With Pavonis you can compile your NSIS script and get the output of any errors and warnings.

like image 28
Keith Avatar answered Sep 19 '22 06:09

Keith