Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resharper 7: MSTest not working - "Test wasn't run"

Since I upgraded to VS2012 and Resharper 7, my previously working MS Tests are not running anymore.

enter image description here

The tests are run in an ASP.NET environment. I use the following Attributes:

    [TestMethod]     [HostType("ASP.NET")]     [AspNetDevelopmentServerHost("C:\\Projekte\\****\\Website", "/")]     [UrlToTest("http://localhost:7924/")] 

Any idea how to fix this?

like image 914
magnattic Avatar asked Aug 30 '12 06:08

magnattic


People also ask

How do I run a MSTest unit test?

To run MSTest unit tests, specify the full path to the MSTest executable (mstest.exe) in the Unit Testing Options dialog. To call this dialog directly from the editor, right-click somewhere in the editor and then click Options.

How do I run a test in ReSharper?

To run all tests in the session, click Run Current Session. Ctrl+U Y on the toolbar or alternatively, choose ReSharper | Unit Tests | Run Current Session from the main menu.


1 Answers

As odd as it is, using VS2012, using Resharper 8.0, using NUnit, I was receiving this error because of an entry in my app.config file. I added an EntityFramework connection string and this behavior started. Removing the entire connection strings section shows the test runner starts/works again. Viewing output shows the app.config is not valid - this was causing this specific behavior in the test runner - "Test wasn't run".

like image 59
barrypicker Avatar answered Sep 25 '22 12:09

barrypicker