[wix-users] Unit Test Deferred Custom Actions

Nir Bar nir.bar at panel-sw.com
Wed Mar 21 07:54:35 PDT 2018


Since you already factored-out the execution logic from the Session parsing logic you can simply create a local Log() function that will dump log messages to Session.Log() or Console.WriteLine() as appropriate.

One thing to note however, is that unit-testing custom actions can't be complete without executing it in LocalSystem account (as opposed to an Administrator account).

I usually unit-test custom actions by developing a standalone package that only executes the custom action. 
I suppress PublishXXX and RegisterXXX standard actions so the package just executes the custom actions without leaving any other trace on the machine.




--
Nir Bar, Independent WiX Expert. Creator of-
JetBA: WiX WPF Bootstrapper User Interface Framework

JetBA++: WiX Native Bootstrapper User Interface Framework






More information about the wix-users mailing list