In this post , I would be focusing on the issue that generally comes to query on how to run JustMock with standalone tools like nunit or msbuild console. Since mocking concrete method works initializing the .net profiler that is set using two variables in the runtime to let JustMock work the correct way.
Now while running msbuild or nunit console or standalone GUI tool, initialization is not always the easy / expected thing to get going. Therefore I created a tiny runner (unofficial) that will do just that and let you pipe your test DLL containing the tests with JustMock. All you have to do is create a batch file where you will pass the path to runner and test DLL in the following format:
JustMockRunner.exe "%Path to test runner%\nunit-console.exe” "%PathToDir%\JustMockTrialTests.dll"
Once the bat is executed, in this case it will open up the console, run the tests and print result from the test runner.
The runner along with a sample project (taken from a user’s post in JustMock forum) can be downloaded by clicking the link below:
P.S. To take the advantage of profiler intensive tests , JustMock full edition must be installed which actually registers the profiler. Also, please build the test project (output DLLs are removed) before running Run.bat .
Hope this helps
Update : JustMockRunner.exe to work in .net 3.5 and removed the extra Console.ReadLine that was causing problem in CI server integration.
Copyright © 2017, Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.