Typemock not integerating with VS2017 and NUnit3

寵の児 提交于 2019-12-23 19:00:15

问题


Trying to debug tests that use TypeMock and I get the following error:

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')'

"Integrate with other Runners" is selected.

Versions:

  • Visual Studio: 15.9.4
  • TypeMock: 8.6.5.1
  • NUnit: 3.7.1

Installing the latest versions of TypeMock and NUnit does not fix the issue.

Edit: it works fine when I 'run' the tests. It only fails in 'debug'.


回答1:


The solution to this problem (as provided by TypeMock Support) was as follows.

Create a file named knownRunners.dat in C:\Program Files (x86)\Typemock\Isolator\8.6 (TypeMock remarked that this might not be the location of my TypeMock 8.6 installation - so it would be best to confirm.) The contents of the file should be:

testhost.x86.exe
testhost.exe

After doing this I restarted Visual Studio, and I could debug tests without any issues.




回答2:


My name is Coral, and I work for Typemock.

I noticed by chance your post here and I'd like to help you :)

Do you mind answering the following questions, please:

• What runner are you using to run your tests? • Do you use other tools as well (e.g dotCover, Coverage)?

Additionally, I'd appreciate it if you could run following task for me:

Go to Typemock->Options->Mocking Integration and check that "Enable Mocking integration" and "Enable Auto Linking(with other Coverage Tools)" boxes are checked too. Then, Open Developer Command Prompt for VS2017 as an admin - Run the command: devenv /Setup - Wait until it finishes - Open your solution

Try to debug your tests now and please let me know if this solves the issue.

It would be helpful if you could send us the logs directly to the following e-mail address: support@typemock.com

You can retrieve the logs via (Typemock->Options->Logs-> Mocking ( check SmartRunner as well if you are running via SmartRunner)

I hope this helps. In the future, feel free to open a ticket at Typemock support: https://typemock.freshdesk.com/support/tickets/new



来源:https://stackoverflow.com/questions/53983541/typemock-not-integerating-with-vs2017-and-nunit3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!