Unit Test categories with R# 6.0 in VS2010

We have a barrage of (nunit) unit tests in our solution, in order to differentiate the long-running performance tests or integration/system tests that consume external resources many of them are categorised as "Performance" or "External Dependency". The reminder, the genuine Unit Tests, are left uncategorised.

In the unit test explorer, I can see the three category choices when selecting to group by Categories, but when I right click on the "<Uncategorized>" options and run selected tests, the resulting session will include some tests which are categorised with one our two named categories.

This wasn't a problem in 5.0, but is an issue in

JetBrains ReSharper 6.0 C# Edition
Build 6.0.2202.688 on 2011-06-29T20:14:16


Thanks.

2 comments

Hello Chris,

I'm afraid I wasn't able to reproduce this behavior. Could you please attach
a small sample solution demonstrating this problem? Thank you!

Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

We have a barrage of unit tests in our solution, in order to
differentiate the long-running performance tests or integration/system
tests that consume external resources many of them are categorised as
"Performance" or "External Dependency". The reminder, the genuine Unit
Tests, are left uncategorised.

In the unit test explorer, I can see the three category choices when
selecting to group by Categories, but when I right click on the
"<Uncategorized>" options and run selected tests, the resulting
session will include some tests which are categorised with one our two
named categories.

This wasn't a problem in 5.0, but is an issue in

JetBrains ReSharper 6.0 C# Edition
Build 6.0.2202.688 on 2011-06-29T20:14:16
Thanks.

---
Original message URL:
http://devnet.jetbrains.net/message/5321219#5321219



0

I wish I could!

We've got 1750 tests in hundreds of files across 40 projects in the solution file.

Certainly some of the problems seem to be within TestCaseData objects being returned from a TestCaseSource method, e.g.

public static IEnumerable TestCases
{
    get { 
        yield return new TestCaseData(...).SetName("a");
    }
}
     
[TestCaseSource("TestCases")] public void Test() { ... }


Where, despite the class being marked with a Category("cat") attribute, these aren't 'seen' by TestRunner.

Also, it tends to be recently run tests. So a system test that I've been running, but in another session (possibly a now closed session) would then re-appear when creating a new 'uncategorised' session. Maybe there's a cache of tests not being emptied?

Aside from trying to recognise a better connection between the cases, I can't really build a cutdown version of the solution.

0

Please sign in to leave a comment.