Unit Test Explorer fails to group by Category (dotnet core / VS2017)

I have a problem whereby nUnit test categories are not being parsed correctly in the Unit Test Explorer, for example: 

"Explicit" is obviously not a category, but is caused by use of the ExplicitAttribute.

Similarly, "[Category" and "Integration]" are invalid also.

Possibly due to instances where multiple attributes have been declared in one go?  e.g.

[TestFixture, Category("Integration")]

Note, the categories are detected correctly in the MSTest runner. 

Stack
.NET Core 2.0
VS2017 15.3.3
R# Ultimate 2017.2
nUnit 3.7.1

0
4 comments

Hello Chris!

 

Thank you for contacting us.

Could you please specify if the problem is reproduced on some specific solution or on any newly created solution also?

Thank you

0
Avatar
Permanently deleted user

Hi Angelina - I've tried to recreate the problem in a new solution.

I can't re-create the problem with the corrupt category names, but I've created a sample which definitely exhibits some similar behaviour, such as:

  • Tests disappearing from the Test Explorer window (you can make them re-appear by modifying one of the tests)
  • Test executions not reflected in the Unit Test Session window (closing the window and retrying often works)

I saw similar things with the corrupt category names: if you went in and changed something in one of the test source files, the test would suddenly appear under the correct (un-corrupted) category name.

Here's the solution (it simply contains some examples of the nUnit features we're using):
https://1drv.ms/u/s!Aunfoi0zU5rjsX0nupjp17kR3CnX 

Chris

0

Hello Chris!

 

Thank you for the provided info.

Unfortunately I couldn't reproduce the issue using the specified solution.

Could you please start VS with the following command: "devenv /ReSharper.LogFile C:\resharper_log.txt /ReSharper.LogLevel Verbose", reproduce the issue and share log file with us?

Thanks in advance!

0

Hi Angelina,

We are still experiencing this issue where the Unit Test Explorer doesn't reflect the test categories until I manually open the source code file.

I have slightly updated the solution and included a resharper_log.txt, uploaded to here - https://finbourne-my.sharepoint.com/:f:/p/steve_collie/EoRT15Bn0NBDlDP-wxkb6igBqtwVZIWHn5SdX-DJ26PVOg.  If you download this and open in Visual Studio, you should see the tests in Unit Test Explorer show up under "Uncategorised" until you open Program.cs.

 

Are you able to help us resolve this?

 

Thanks,

Steve

0

Please sign in to leave a comment.