Skip to content

Test methods in a base class defined in a different assembly are not navigable in Test Explorer #163

@AbhitejJohn

Description

@AbhitejJohn

Pulled this out of #23.

Description

After turning on EnableBaseClassTestMethodsFromOtherAssemblies fixed in #23, new tests defined in the base class start appearing in the Test Explorer. These tests show up under the External node in Test Explorer instead of the derived project. This is happening because the DIA source information logic is searching for these methods in the derived assembly and cannot find it.

Steps to reproduce

Add the following runsettings

<RunSettings>    
  <MSTest> 
    <EnableBaseClassTestMethodsFromOtherAssemblies>true</EnableBaseClassTestMethodsFromOtherAssemblies> 
  </MSTest> 
</RunSettings>
  1. Create two test projects - one with a BaseTest class and another with a DerivedTest class with the DerivedTest extending BaseTest.
  2. Add test methods in both the classes.
  3. Discover tests from the project containing DerivedTest.
  4. Double click the BaseTest tests.

Expected behavior

The user should be taken to the tests definition.

Actual behavior

Nothing happens.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Help-WantedThe issue is up-for-grabs, and can be claimed by commenting

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions