views:

174

answers:

1

I've got a handful of functions in my InstallScript that are good candidates for unit tests. My project is a InstallScript MSI project. I found an article about how to unit test Custom Actions with custom ICEs, but the code I want to unit test isn't in a Custom Action, it is in the UI sequence.

Is there a way to unit test this kind of InstallScript code?

A: 

I would suggest the SprintfMsiLog() InstallScript function. It will write to the MSI log file, and so you can troubleshoot what's happening just as if it were an MSI standard action.

I hope I'm understanding what you mean by "unit test".

William Leara
That isn't exactly what I was looking for. I would like to execute InstallScript functions the same way I can execute Java functions with JUnit or the same way I can execute C# functions with NUnit. However, writing intermediate output to the log file is a good idea.
epotter