Using Isolator’s Auto-Deploy
Michael Braude wrote about evaluating Typemock to hook into the code. His problem was that he felt he can’t make people install it prior to running their tests.
Well, first, why not? If you’re using Isolator’s API in your tests, and you want to run them, you need to have it installed. Sometimes you don’t want it installed on your build server, (for keeping the registry clean for example), but still want to run your tests.
So here’s auto-deploy. You can use this option from your build script to deploy Isolator from a single folder. To do this, copy all the DLLs from the Isolator directory. Also, from the x86 folder, copy the 2 dlls into that folder as well.
Then use the Register task (this example works with MSBuild, but also for the NAnt task) you specify the following:
<Import Project ="$(TypeMockLocation)TypeMock.MSBuild.Tasks"/>
<TypeMockRegister Company ="Typemock" License="TypemockLicense" AutoDeploy="True"/>
You call this target prior to the Start task, which you call before running your tests. And the you undeploy by:
That’s it. The deployment process takes care of registering the COM object, and the undeploy process un-registers it. So this is a way to run multiple versions of Isolator on a build server.