Open and run the tests in the attaches solution. The tests in "Machine.VSTestAdapter.Specs" should pass, but when run with the CodeRush unit test runner - they fail. They work fine in Resharper and using the MSpec command line. See attached screenshot.
Test Runner does not run MSpec tests
Answers approved by DevExpress Support
We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.
Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.
I have installed the nuget-package Machine.Specifications v0.11.0, but the Coderush Roslyn TestRunner can't start the tests?
What should I have to do to use mspec?
Regards, Lars
Hi Lars,
Let's discuss the issue you're talking about in the context of the separate ticket I've created on your behalf (T481192: CodeRush for Roslyn TestRunner can't start the mspec tests).
The ticket has been placed in our processing queue and will be answered shortly.
Screenshot
Hi Ivan,
I have reproduced the described behavior with CodeRush. However, I got the same results using the VS MSpec test adapter (http://screencast.com/t/14l4qt8f2OHu). Also, while running all tests in a project, there are failing tests. When I try to run them one by one, it all runs fine. That makes me think that CodeRush is working correctly. Can you try to run tests using the VS MSpec adapter and let us know your results?
Hm. You are right - they fail in both. However the CodeRush is reporting incorrect test error as you can see side-by-side on the screenshot attached.
Screenshot
Right, so I have fixed the failing test based on the information in the VS Test Adaptor and it now passes there, but still fails in CodeRush. See on the screenshot attached. I will attach the updated solution in the next comment.
Updated solution
Hi Ivan,
Thank you for the solution. I have managed to reproduce the issue, and we are researching it. Meanwhile, I have noticed that failing tests are passed if they are running one by one separately. It makes me think that test cases aren't isolated properly (using static members, which can be affected by the previously running test).
I don't think it's a problem with test isolation, because I am seeing this problem across wide range of projects (some open source, some internal) and only with the CodeRush runner. Seems to be triggered by the use of Machine.Fakes.
Ivan,
Thank you for the update.