chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
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!
+1 vote
Hi,

I trying the run the test cases in VS cmd 2017 MSTest.exe /testcontainer:unitest.dll /resultsfile:C:\\\\result.txt.

However, when running the above command, it records a bunch of failures into my result.txt file, all of which says,

Test Run deployment issue: The assembly or module \\\'dll\\\' directly or indirectly referenced by the test container along with the below error message,

<ErrorInfo>

          <Message>Test method dll threw exception:

TypeMock.TypeMockException:

*** Typemock Isolator is currently disabled. Enable using the following:

 * Within Visual Studio:

   - Use Typemock Smart Runner  

   - For other runners, Choose Typemock Menu and click \\\"Integrate with Other Runners\\\"

 

 * To run Typemock Isolator as part of an automated process you can:

    - run tests via TMockRunner.exe command line tool

    - use \\\'TypeMockStart\\\' tasks for MSBuild or NAnt

 

For more information consult the documentation (see \\\'Running Unit Tests in an Automated Build\\\')</Message>

          <StackTrace>    at TypeMock.InterceptorsWrapper.VerifyInterceptorsIsLoaded()

   at _bA8MUQpKrWjP9CfB6RrB0Z34ehO_._6FuHQwNCuPHBRvIV7SHnpnSiqvL_._2cFKNkGqghvNa04ua7KbBkckuQB_()

   at TypeMock.MockManager.Init(Boolean collectAllCalls)

   at _FOxS0GrAvpjtZgiarLWDABZzuqv_._BFmGFkAxbdbd4exl0lSy0uwFqwl_._xRL0uEmGxgt8coXPq5Ty9sfsevB_[\\\\u0001](Members , Constructor , Constructor , Type , Object[] )

   at _FOxS0GrAvpjtZgiarLWDABZzuqv_._BFmGFkAxbdbd4exl0lSy0uwFqwl_.Instance[T](Members behavior)

   at _FOxS0GrAvpjtZgiarLWDABZzuqv_._BFmGFkAxbdbd4exl0lSy0uwFqwl_.Instance[T]()

</StackTrace>

        </ErrorInfo>

Requesting to please help me on this.
asked by (610 points)

1 Answer

0 votes
Hi Salman,

If you wish to run tests via cmd, the recommended way is using TMockRunner.

Can you try running your tests with TMockRunner and let me know if it works?

Thanks,

Sapir.
answered by (3.1k points)
Sapir,

Started cmd and ran the below command

C:\\Program Files (x86)\\Typemock\\Isolator\\8.6\\BuildScripts>TMockRunner.exe mstest.exe unit-test.dll

Typemock Isolator Enterprise License - License will expire in 12 day(s)

unit-test.dll

Error running: mstest.exe The system cannot find the file specified
Okay, here is what I did. Opened Developer Command Prompt VS2017 and ran the following command C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional>\"C:\\Program Files (x86)\\Typemock\\Isolator\\8.6\\BuildScripts\\TMockRunner.exe\" MSTest.exe /testcontainer:unit-test.dll /resultsfile:C:\\testResult.txt

This worked and made all my test cases to pass.

Thanks Sapir, for giving me the pointer.
Hi Salman,

I\'m glad to hear that you managed to solve the issue!

Please let us know if we can assist you in any other way.

Cheers,

Sapir.
...