question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Test discovery fails when using TestCaseSource in RIDER and VS2017 with Resharper Unit Tests

See original GitHub issue

Hi, Since updating NUnit3TestAdapter to version 3.16.0 the test discovery fails when projects are using the TestCaseSource.

Versions:

  • NUnit: 3.12.0
  • NUnit3TestAdapter: 3.16.0
  • VS2017: 15.9.18
  • Resharper: 2019.3.1
  • Rider: 2019.3.1
  • .Core Version: 2.2.110
  • Target Framework: netcoreapp2.2

Test project to reproduce the error: https://github.com/nesc58/nunit-test-project

Is this a bug in NUnit3TestAdapter or is there something wrong in Resharper 2019.3.1?

After downgrading the project to version 3.15.1 everything works fine. On command line using dotnet test everything works fine.

kind regards, nesc

Test discovery exception:

Unfortunately, it's impossible to discover unit tests in some of your projects. :(
Below you can find the error details for each project.

Exception:
Exception occured during exploration.
    System.ArgumentException: Cannot parse testId Tests.Tests.Test1 with displayName Test1(1, 1, 2)
       bei JetBrains.ReSharper.UnitTestProvider.nUnit.v30.DotNetCore.NUnitDotNetCoreTestElementMapper.ParseFqn(Test test)
       bei JetBrains.ReSharper.UnitTestProvider.nUnit.v30.DotNetCore.NUnitDotNetCoreTestElementMapper.Map(Test test, Boolean isDiscovery, Boolean& wasChanged)
       bei JetBrains.ReSharper.UnitTestFramework.DotNetCore.DotNetVsTest.DotNetVsTestDiscovery.CreateElements(TestCase testCase)
       bei JetBrains.ReSharper.UnitTestFramework.DotNetCore.DotNetVsTest.DotNetVsTestDiscovery.TestsDiscovered(TestCase[] tests)
       bei Appccelerate.StateMachine.Machine.ActionHolders.ArgumentActionHolder`1.Execute(Object argument) in C:\projects\appccelerate\repos\statemachine\source\Appccelerate.StateMachine\Machine\ActionHolders\ArgumentActionHolder.cs:Zeile 50.
       bei Appccelerate.StateMachine.Machine.Transitions.Transition`2.PerformActions(ITransitionContext`2 context) in C:\projects\appccelerate\repos\statemachine\source\Appccelerate.StateMachine\Machine\Transitions\Transition.cs:Zeile 225.```

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:9
  • Comments:16 (7 by maintainers)

github_iconTop GitHub Comments

9reactions
OsirisTerjecommented, Jan 10, 2020

Jetbrains says the fix will be in 2020.1 and 2019.3.2

6reactions
OsirisTerjecommented, Jan 7, 2020

I have created an issue at the jetbrains support system, https://youtrack.jetbrains.com/issue/RSRP-477651

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problems with .NET unit testing
I tried creating a Fresh Unit Test project Using dotnet new xunit and wrote a simple unit test and the problem recurs. Pdb...
Read more >
Test method is inconclusive: Test wasn't run. Error?
So in summary, I was receiving the Inconclusive when I was using both PackageReference for my dependencies AND my Unit Testing Project .csproj ......
Read more >
Unit Testing - ReSharper Essentials - YouTube
As a result, you get a much faster feedback loop. ReSharper also provides coverage statistics using dotCover. By covering Unit Tests ...
Read more >
NUnit tests is not found or do not run in Visual Studio's ...
Almost always when I face this issue, the problem is that the project does not have any Test Adapter or Runner installed, and...
Read more >
RSRP-476434: Rider does not discover dynamic unit tests ...
RSRP-476434: Rider does not discover dynamic unit tests provided through the NUnit TestFixtureSource or TestCaseSource attributes. ; Sep 27, 2019, 4:36:20 PM.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found