Problems with .NET unit testing

 

As of version 2017.1, JetBrains Rider automatically detects unit tests and provides a unit test runner to run and debug them. We are continuously improving unit testing with JetBrains Rider, but there are still some areas which are not supported. 

So what is currently supported and what is not? 

  Supported in 2017.1 Supported since 2017.2
Unit testing Frameworks

xUnit

NUnit (IMPORTANT: Unity 5.6+ with NUnit tests does not work in 2017.1, see YouTrack issue)

Classic MSTest (Windows only)

MSTest v2

Runtime

.NET Framework

.NET Core 1.x

Mono (4.8+ recommended)

.NET Core 2.0

If you experience any issues with a supported unit testing framework on a supported runtime, please create a request and describe the problem in details, as it will help to sort it out timely. The following information is essential to determine the cause of the issue:

Environment

  1. OS version, for example, Windows 10 or Mac OS X 10.8
  2. JetBrains Rider version: Help -> About
  3. Unit testing framework version, for example, xUnit 2.2.0
  4. MSBuild version: Settings -> Build, Execution, Deployment -> Toolset and Build (find screenshot below)
  5. .NET Core version in case you have .NET Core project:
    • Check a path to dotnet executable via Settings -> Build, Execution, Deployment -> Toolset and Build (find screenshot below)
    • Go to the directory with dotnet executable via terminal
    • Run "dotnet --version" command

Log Files

  1. Build your solution and then get 'backend.log' file: Help -> Show Log in Explorer/Finder/File Manager
  2. Run Unit Tests if you can see them in unit test explorer 
    • Get launch log files: Launch settings -> Show Last Launch Log (find screenshot below)
    • Get unit test process log files as described here
  3. Zip these three log files and attach the archive to the request

 

Additional information

  1. Sample solution where the issue reproduces is very much appreciated
  2. Can you see your unit tests in unit test explorer?
  3. Are there any steps to reproduce the issue?
  4. Has it worked in the previous version of JetBrains Rider?

 Thank you for helping us make JetBrains Rider better!

2 comments

The marketing page for Rider quotes NUnit test support. Is this only for .Net Framework and not .Net Core projects? There is no template for a .Net core Nunit test project: 

For now I am using NunitLite to debug and run tests.

Edited by Alex Taroghion
0

@Alex
NUnit dotnetcore is not working in the current release.

However it is already fixed in Re# and will get to Rider 2017.2.

https://youtrack.jetbrains.com/issue/RSRP-464912#comment=27-2312068

0

Please sign in to leave a comment.

Have more questions?

Submit a request