Welcome to Typemock Answers. Here you can ask and receive answers from other community members. And if you liked or disliked an answer or thread: react with an up- or downvote Enjoy!

MockInserter not running, please run 'mocking_on.bat'

0 votes
I get the above message when i try to run any test even though i did run the batch file before
asked Jan 22, 2005 by tolisss (3,660 points)

3 Answers

0 votes
I get the above message when i try to run any test even though i did run the batch file before


Hi,
The MockInserter must be set on before you run the tests (This turns TypeMock.NET on) . So if for example you are using the nunit-gui, you must first run mocking_on.bat and then nunit-gui.exe (in the same session). Running the gui and then run the batch file, won't work.

The other way to run the tests is by running the tests through TMockRunner, this is done by typing TMockRunner nunit-gui <assembly> on the same line, and this will assure that Mocking is enabled. (see Jump Start)

When running TypeMock tests using a Visual Studio add-in (TestDriven.NET for example) you have to run the Visual Studio after enabling mocking. This can be done by starting the Visual Studio Command line, running mocking_on.bat and then running devenv (see FAQ). We are currently working on a Visual Studio Addin that will enable turning on the mocking, from within the environment.

I hope that this clears things up, and that you are able to run your tests.
answered Jan 22, 2005 by richard (3,900 points)
0 votes
Hi im not using nunit i m trying to make your promising library work with TestDriven.Net addin could u please suggest how can i achieve it. I read at your site that the addin is supported but i couldn't manage to run any test yet
answered Jan 23, 2005 by tolisss (3,660 points)
0 votes
Hi,
It is quite simple, follow these steps.
1. Start the Visual Studio Command Line
2. In the command line screen run [TypeMock Installation]/mocking_on.bat
3. run devenv

By the way what unit testing framework are you using?
answered Jan 23, 2005 by richard (3,900 points)
...