When I run my unit tests in my project I am seeing a result "Not executed" for every one. I have restarted my computer so I doubt this is some kind of hung process issue.
Google has revealed nothing. Does anyone have any ideas?
To run all the tests in a default group, choose the Run icon and then choose the group on the menu. Select the individual tests that you want to run, open the right-click menu for a selected test and then choose Run Selected Tests (or press Ctrl + R, T).
To enable Live Unit Testing, select Test > Live Unit Testing > Start from the top-level Visual Studio menu.
You just need to hover your mouse at the bottom of Test Explorer and drag it up. You can see Test Details summary below of your test regardless of Run or Debug mode.
To generate unit tests, your types must be public. Open your solution in Visual Studio and then open the class file that has methods you want to test. Right-click on a method and choose Run IntelliTest to generate unit tests for the code in your method. IntelliTest runs your code many times with different inputs.
What a PITA! The IDE doesn't show any errors. In order to determine the error you have to do this
At the bottom of the output you will see the following text
Run has the following issue(s):
In my case it was the following:
Failed to queue test run 'Peter Morris@PETERMORRIS-PC 2009-02-09 10:00:37': Test Run deployment issue: The location of the file or directory 'C:\SomePath\SomeProject.Tests\bin\Debug\Rhino.Mocks.dll' is not trusted.
Now if VS had told me this in the IDE I could have fixed it in minutes! All you have to do is open Windows Explorer and find that DLL. Right-click on it and go to Properties. Then click the "Unblock" button.
What a complete waste of my time!
Unit tests not executed
I've found that it is good advice to never have a constructor for a unit test class. If anything in a constructor ever throws, the test will just be reported as "not executed". Put test initialization in a TestInitialize method instead. Exceptions thrown there are reported by the IDE.
Blocked Binaries
Usually you have to unblock the ZIP file itself before you extract binaries from it, and then all the binaries will be unblocked. If you try to unblock the binaries themselves the unblocking doesn't "stick".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With