Resharper Unit test window not grouping by nested classes

I have just updated to Resharper 2020.3.2, using with Visual Studio 2019 16.8, Community edition. I am using MsTest. 

I have my unit tests structured with nested classes (a common practice). However, the unit test window no longer groups by nested classes. This used to work. I encounter the same issue with different versions of the MsTest Adapter.

Test code:

using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace NestedClassTest
public class OuterTestClass
public void OuterTestMethod1() {}

public class InnerTestClass
public void InnerTestMethod1() {}

Result in Resharper Unit Test Session window:

I would expect the InnerTestClass to be sorted under the OuterTestClass, and this is how it worked ever since I have been using Resharper. This is very annoying because I have large test files that use this structure. For example, the "Constructor" nested class is used very often under a test class, and I would see them listed as an independent class, not knowing where they belong.

Also, I cannot run all tests in the OuterTestClass when running it either from the editor window or from the session. It will run only the methods in OuterTestClass, not the nested class's methods - which is how it used to work.

Result in Visual Studio Test Explorer:

The sorting with the OuterClass+InnerClass is strange but so far I have been using Resharper so I am not sure if that's normal Test Explorer behavior or not. I would expect the Inner class be under the Outer class, but at least test explorer assigns the proper name so I can tell where the nested class belongs.

I have been able to reproduce this with my old projects, and also with the test code above.  It seems universal, not project related. 


Please advise, my unit test results are very jumbled at the moment.

1 comment
Comment actions Permalink
Official comment

Hello Gabnaim,


The problem seems to be similar this bug report -

Please feel free to comment or vote for the issue and follow it to get the latest updates.

Thank you.

Please sign in to leave a comment.