Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unit Test: The cancelation of the test run is not possible as there is no test run which is in progress

I get the following error when I successfully run unit tests in VS2012:

The cancelation of the test run is not possible as there is no test run which is in progress

The error only appears after the unit tests succeeds (green check in visual studio).

Why do I get this error?

like image 880
thumbmunkeys Avatar asked Jun 03 '13 11:06

thumbmunkeys


People also ask

How do I stop a test case from running in Visual Studio?

You need to close the Test Explorer Window to prevent automatic running.

How do you stop a test from running in Vscode?

View > Layout > Test: Test windows show out. Click “Run all tests” button, then click “stop the executing solution” in the menu bar, the test also stopped.

How do you stop a test runner?

Stop tests Use the following options on the Run toolbar of the Test Runner tab: Click. or press Ctrl+F2 to terminate the process immediately.

Does test is not included in unit testing?

A test is not a unit-test if: it communicates with a database. it cannot run in parallel with other tests. uses the "environment" like registry or file system.


1 Answers

I'm using VS 2012 and using the Test Explorer with the NUnit Test Adapter and this error prevented me from being able to debug a failing test. I found a workaround to this issue here

To overcome these exceptions:

  1. Navigate to the Debug menu item
  2. Select "Options and Settings..."
  3. Check "Enable Just My Code"

As a side note, this also allows you to step-into shimmed code (via fakes usage).

like image 165
MoMo Avatar answered Feb 15 '23 23:02

MoMo