Bug Report T618830
Visible to All Users

Test Runner disables the "Debug" option for test cases containing the "Inconclusive" assertion

created 7 years ago (modified 7 years ago)

Reproduction instructions:

Either in the Test Runner window or from the circular icon next to the "TestMethod" attribute, select the "Run" context menu option for the following example unit test.

using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace UnitTestProject1
{
    [TestClass]
    public class UnitTest1
    {
        [TestMethod]
        public void TestMethod1()
        {
            Assert.Inconclusive("force an 'Ignored' test result state");
        }
    }
}

The "Debug" context menu option will now be disabled.

Expected behaviour:

The "Debug" context menu option should be enabled. Ignore should only apply to the "Run test" and "Run test with coverage" options.

Since the code is still compatible and debuggable, why prevent the developer from having the option to decide to debug the test simply on the basis that the prior execution was inconclusive.

Given that the yellow icon already informs the developer that this was the case coderush should let the developer make an informed decision to invoke the debugger, rather than attempting to second guess on the developers behalf that they should not be debugging an inconclusive test.

Regards,
Simon Geering

Comments (1)
DevExpress Support Team 7 years ago

    Hi Simon,

    Thank you for pointing out this issue and providing your code sample.

    CodeRush Test Runner cannot determine why a test is ignored: the Ignore attribute or the Inconclusive assertion. So, we have decided to remove disabling for all context menu items ("Run test", "Run test with  coverage" and "Debug test"). We are working on this change and will inform you on our 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.