Bug Report T607416
Visible to All Users

Test Runner - Inherited tests are detected but not executed when a base class is in another assembly and has .NET Standard dependencies

created 7 years ago

Hi,

When porting code from a previous .NET 4.7.1 application I encountered the following problem:
When the unit tests projects are .NET Standard/Core projects the unit tests are detected but not executed.

There is already a support ticket for this issue that seems to be resolved. Maybe it will be included in the next version.
As a workaround I changed the test projects to .NET 4.7.1 as target framework.
Afterwards the tests are executed again unless they are inherited from a base class that is located in another assembly.
When placing the base class in the same assembly everything works fine.
This functionality worked fine in the past (even across assemblies) if all projects are referencing .NET 4.7.1 as target framework.

I attached a Demo project and screenshots of a loca test run (Run all)

Kind regards

Wolfgang

Comments (1)
DevExpress Support Team 7 years ago

    Hello Wolfgang,

    Thank you for your code sample.
    I have reproduced exactly the same behavior.
    And, it seems that this issue is not related to the project's target framework.

    In your project, the test from the DemoBaseTest class does not run because it is abstract and inherited by the DemoTest class in a different assembly (Demo.Tests).
    The test from the LocalDemoBaseTest class runs, because it is inherited by the LocalDemoTest class in the same assembly (Demo.Tests).
    Here is a screencast that illustrates how it works if we inherit the DemoBaseTest1 class to the same assembly as the DemoBaseTest class (DemoBase.Tests): https://www.screencast.com/t/MrTe8QuFQ

    So, the issue appears because we do not recognize tests in the DemoBaseTest class when handling the DemoTest class.

    We will research this issue and let you know as soon as we make any progress.

    Answers approved by DevExpress Support

    created 7 years ago

    We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

    Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

      Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

      Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.