[wix-users] Unit tests for Managed Bootstrapper

Phill Hogland phill.hogland at rimage.com
Fri Jan 20 13:51:09 PST 2017


Thanks. I will touch base with our out-sourced IT group.

________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Blair Murri <osito at live.com>
Sent: Friday, January 20, 2017 3:28:57 PM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] Unit tests for Managed Bootstrapper

Phill,



I don't know but other places I've seen that type of message was due to the sending domain not (correctly) implementing SenderID metadata in DNS.



Blair



Sent from my Windows 10 phone



From: Phill Hogland<mailto:phill.hogland at rimage.com>
Sent: Thursday, January 19, 2017 10:42 AM
To: WiX Toolset Users Mailing List<mailto:wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Unit tests for Managed Bootstrapper



I don't know why that "This sender failed our fraud detection checks and may not be who they appear to be" got attached to my post.  Feel free to drop by and take a gander at me to se if I really am me if you like!

Phill

________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Phill Hogland <phill.hogland at rimage.com>
Sent: Thursday, January 19, 2017 12:31:51 PM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] Unit tests for Managed Bootstrapper

[This sender failed our fraud detection checks and may not be who they appear to be. Learn about spoofing at http://aka.ms/LearnAboutSpoofing]

I use Microsoft.Pratices.Unity to implement DI and then I create test seams in Event Handlers and anywhere where the Wix objects would be used, so that the logic to be tested is isolated in a submethod, with necessary wix data passed into it from the calling handler (or calling method).  My nunit unit tests don't call the Event Handler but the underlying submethod passing in mocked data that would have come from the wix api calls.  I have used NSubstitue but mostly I just isolate the code to be tested in submethods, and I try to reduce the complexity of any particular method so that the tests are simple and clear.  So the unit tests do not have any dependency on wix objects.  I do not try to run a bundle.exe, to do unit testing, as that seems to me to be contrary to the core concept of unit testing.  I run about 458 tests in a few seconds with each build of the mba dll, without needing to build any of the various bundles which use the mba, a much slower process.


In my XAML I have implemented the automation properties with the hopes of someday working on implementing a framework for integration testing where I would spin up a full build of a bundle to test the UI or some integration behavior.  Others have discussed their approaches to integration testing here a little over a year ago (or maybe in the old archives).  But for my money focusing on DI and clean unit tests which do not have any dependencies has been a far more effective approach.

________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Farrukh Waheed <farrukh1 at gmail.com>
Sent: Thursday, January 19, 2017 1:15:55 AM
To: WiX Toolset Users Mailing List
Subject: [wix-users] Unit tests for Managed Bootstrapper

Hi experts,
I'm writing Unit Tests for our managed bootstrapper and covered only 22% of
the code, i.e. the public methods used to read
BootstrapperApplicationData.xml and some utility methods.

But there is functionality which needs a running process of Bootstrapper,
especially the Engine and related Event Handlers. In addition, the Burn
variables which would be available when it is running.

How to deal with this situation in unit testing? Do I have to launch the
process (myBootstrapper.exe) to achieve this?

Regards

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
WiX Support | WiX Experts and Resources from FireGiant<http://www.firegiant.com/>
www.firegiant.com<http://www.firegiant.com>
WiX Support | Installation, Development, Deployment | WiX Experts and Resources from FireGiant




____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/



More information about the wix-users mailing list