Bug 385 - Test hierarchies are not colored correctly during testing
Summary: Test hierarchies are not colored correctly during testing
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: NUnit ()
Version: 2.6 RC 1
Hardware: PC Linux
: --- normal
Target Milestone: 2.8.1
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2011-08-24 16:21 UTC by Matt
Modified: 2011-09-22 02:42 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Stack trace and message from debugging test failures (1.36 KB, text/x-log)
2011-09-20 15:20 UTC, IBBoard
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Matt 2011-08-24 16:21:03 UTC
In test projects in which the test class is separate from the test fixture class, the test hierarchy does not light (red/green) correctly.

For example,

////////////////////////////////////
using System;
using NUnit.Framework;

namespace TestingBug
{
    [TestFixture]
    public class FixtureClass : TestsClass {}
    
    public class TestsClass
    {
        [Test]
        public void Test1() {Assert.That(true);}
            
        [Test]
        public void Test2() {Assert.That(true);}
            
        [Test]
        public void Test3() {Assert.That(false);}
        
    }
}
 
/////////////////////////////////////

When run in the unit test dialog, will show the fixture as partially successful (a red and green circle), but the individual tests are not colored.


Perhaps related, if the file is changed to:

//////////////////////////////

using System;
using NUnit.Framework;

namespace TestingBug
{
    [TestFixture]
    public class FixtureClass 
    {
        [Test]
        public void Test1() {Assert.That(true);}
            
        [Test]
        public void Test2() {Assert.That(true);}
            
        [Test]
        public void Test3() {Assert.That(false);}   
    }
}

//////////////////////////////

The first two tests color green and the last test is uncolored.
Comment 1 IBBoard 2011-09-20 15:20:09 UTC
I have a similar bug (I think) to the first one. If I make an abstract class with some common tests in (say, common equality and hashcode checking where implementers fill in the missing bits) then the abstract tests have the blue border for "about to run" but never go green/red and don't show in the results. 

The only way I know they failed is that I have 305 tests as the test run starts and it says 295 tests by the end of the run. Other than that then I've got to expand the nodes to spot it.

I did a bit of poking and got a stack trace, which I think is related.

All of this is on openSUSE 11.4 with MonoDevelop from Git Master (default branch).
Comment 2 IBBoard 2011-09-20 15:20:59 UTC
Created attachment 452 [details]
Stack trace and message from debugging test failures
Comment 3 Mike Krüger 2011-09-22 02:42:46 UTC
fixed.