Resharper output window not showing steps anymore - resharper

Recently we had a change to our Xunit and we upgraded to Xunit 2.0 and all projects to .NET 4.5. Before this change,when I ran the feature file, I remember seeing the steps on the output window (of Resharper unit test session) of a failed test and it would pinpoint where the test failed at. But now, it only shows what kind of error it is and no steps in the output pane.
Can anyone tell me how to get the steps back as it is very annoying and difficult to find out where the test failed.
Note: We are using specflow to write the tests and run them using Resharper. The version of Resharper I am using is 8.2.1000

Support for XUnit 2.0 does not exist in Specflow yet. There is an outstanding pull request, but it still has some issues I think. So I think your options are to revert to the previous version of XUnit or roll up your sleeves and contrbute to the open PR.

Related

How to show dotCover coverage in new VS2017-type csproj project

I have a solution that contains 3 projects.
PROJECT 1
A VS2017-style .csproj project that has multitargetting to net45 and netstandard1.1.
PROJECTS 2 and 3
Two traditional VS2015-style .csproj test projects, targetting net45, using NUnit.
The reason for projects 2 and 3 not to be new-style is because it seems that right now ReSharper does not recognize these assemblies for running tests. It does find the tests just fine on old-style projects targeting any .NET framewory (full) or netcore assemblies, though.
Using that structure, I can run all my tests all right with the unit test window from dotCover, but when trying to gather coverage results it returns all green for the old-style projects, and all empty for the new-style project.
Coverage tree shows 0% coverage for my new-style project. Gutter highlighting and code highlighting all show in grey, although the tests have run successfully. All of them.
I've tried building in Debug mode, and setting specific values for "Platform" and "Framework" on the Unit Test Sessions window of ReSharper to no avail.
Is this something I'm doing wrong, or are we waiting for an update from ReSharper to fix this?
I am using:
NUnit 2.6.4 (because my unit test projects target net45)
Moq 4.5.28
ReSharper Ultimate 2017.1.2 with dotCover 2017.1.2 (says it's up to date at the time of writing).
Visual Studio Professional 2017 15.2 (26430.12)
I have installed all target frameworks until 4.7.02053
The projects I'm talking about are in C#
I had the same issue. And setting <DebugType>Full</DebugType> solved it for me as mentions by Martin

NUnit has stopped working in Visual Studio

I am running NUnit 2.6.3 in VS2012 with NUnit Test Adapater 1.1.0.0, on 64 bit Windows 7. The project is C# winforms.
My project's unit tests have stopped running from within VS. I can launch NUnit directly and run the project OK, but running or debugging tests from within VS just greys them out with this message in the output window:
No test is available in
[Your Output Path].
Make sure that installed test discoverers & executors, platform &
framework version settings are appropriate and try again.
Any pointers of what that means? Where can I find the "platform and framework version settings" - does it refer to NUnit settings, project settings, VS settings, or one of the NUnit plugin settings?
I think that it's related to me updating to the latest version of the Test Adapter, but unfortunately I'm not sure :(
Have fixed it by:
- Updating my project target to .NET framework 4.5 from 3.5 (which my project was in - not my choice!). I cannot find any documentation stating this as a limitation, so perhaps it's a bug.
(I have also changed to using NuGet to install NUnit to the project instead of the VS plugin, but I'm not sure that had an effect).
I had a similar problem but when I tried to run my tests just showed that yellow inconclusive circle.
I ended up solving my problem by going into the bin folder for my project, deleting the NUnit framework dll files and then re-running the tests. Worked like a charm.

NUnit not loading latest version of a Console Application

I am re-writing a console application and trying to use Unit Tests. I'm using NUnit, C#, .NET Framework 4 in Visual Studio 2010 on a Windows 7 PC.
When I change code within the application my unit tests don't pick up the latest changes. I can see that NUnit is reloading but for some reason it's not getting the latest version. The only way to get NUnit to work with the latest version is to remove the reference to the Console app, add it back and compile.
Is there a way to avoid doing this? I think the problem is that the the console app is compiled as an EXE, whereas with most applications I've unit-tested they have tended to be DLLs.
EDIT
I had hoped that this question: Unit Testing a Console Application inside Visual Studio contained the answer. If you look at the accepted answer this was the way I'd been proceeding but my test project wasn't picking up the changes. I've now created a class library and I'm applying my tests to that. My console app will simply load, then call, this class library.
Second Edit
I've now got my code to a stage where I can test functionality and I've noticed the same problem with my console app. Although it 'says' it is referencing the compiled DLL, it only picks up the latest change when I delete and re-attach the reference. So, I'm thinking that the problem isn't necessarily connected to NUnit, rather an issue/quirk with console apps.

Is code coverage available in VS2012 for metro-style apps?

I am using Windows 8 Pro and Visual Studio 2012 Ultimate (both RTM).
I create a Metro-style class library, and then a corresponding unit test library. Both target WinRT (not the .NET framework).
I can run unit tests fine, but when I attempt to "Analyze code coverage for all tests", the output window comes up with the results of the rebuild, and that's it. The Code Coverage Results window is all grayed out.
From reading on the web, some have alluded to the idea that code coverage is not enabled for WinRT assemblies, but I cannot confirm. I have also tried creating a .testsettings file, like was needed in VS2010 and explicitly turn on code coverage, and I got the same results.
Can anyone confirm or deny that code coverage is not available for WinRT-targeted assemblies, in VS2012 RTM?? I'm just trying to figure out if I'm missing some setting - or if it's not possible.
It's not possible at this stage due to the sandboxed nature of WinRT apps.
P.S. It's on the list of things the team is looking to resolve in the near future (no, I don't have a timeframe for it)

Resharper internal error when debugging in 64bits and using SMO APIs

If I debug some unit tests with Resharper, and those unit tests use the SMO SDK, I get this error:
Any idea how to avoid it? I'm running ReSharper 6.1.37.86 (Full Edition)
UPDATE: After upgrading to Resharper 6.1.1000.82, I get a slightly different error:
Filed in JetBrain's issue tracker: http://youtrack.jetbrains.com/issue/RSRP-326369
I managed to find a two-step workaround:
Use .NET 3.5, not .NET 4.0.
After this change, debugger stopped crashing. However, it still was very slow, and sometimes my breakpoints were not hit. The second step that needs to be done for this workaround to make your debugger fully work is:
Go to Properties of your .NET project, "Debug" tab, disable the option "Enable the Visual Studio hosting process"
An example of the effect these two changes have in your project files is this diff:
https://github.com/7digital/DatabaseMigraine/commit/badfebce83a1c4e39ddfce8a707b0e0ca62ad5a0

Resources