NCrunch Forum
»
General Support
»
Build/Test Issues
»
Bug? Test category isn't picked up when in Attribute but MSTest understands it
Rank: Newbie
Groups: Registered
Joined: 2/7/2013(UTC) Posts: 1 Location: United States of America
|
I have NCrunch setup to only run unit tests that are marked with a test category of "Unit". I don't like having strings in my code so I made test attribute that exposes the category but NCrunch doesn't pick it up like all the other tools do.
I can write a TestCategory like this and it works.
[TestCategory("Unit")]
But if I use my custom attribute [UnitTest] it doesn't get run by NCrunch but tools like MSTest understand it.
public class UnitTestAttribute : TestCategoryBaseAttribute { public UnitTestAttribute() { } public override IList<string> TestCategories { get { return new List<string> { "Unit" }; } } }
Please make this work.
Thanks, Paul Mendoza
|
|
|
|
Rank: NCrunch Developer
Groups: Administrators
Joined: 4/16/2011(UTC) Posts: 7,161
Thanks: 964 times Was thanked: 1296 time(s) in 1202 post(s)
|
Hi Paul -
Thanks for posting!
As NCrunch uses metadata to identify categories for tests (instead of dynamic invoke), this approach to defining custom attributes currently isn't supported. I'll ensure its in the backlog for a future release.
Cheers,
Remco
|
|
|
|
Rank: NCrunch Developer
Groups: Administrators
Joined: 4/16/2011(UTC) Posts: 7,161
Thanks: 964 times Was thanked: 1296 time(s) in 1202 post(s)
|
For anyone interested, support for derived MSTest category attributes has been introduced with the newly released version of NCrunch (v1.45), although this will only work if you set the 'Framework utilisation type for MSTest' solution-level configuration setting to 'DynamicAnalysis'.
|
|
|
|
NCrunch Forum
»
General Support
»
Build/Test Issues
»
Bug? Test category isn't picked up when in Attribute but MSTest understands it
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
YAF |
YAF © 2003-2011, Yet Another Forum.NETThis page was generated in 0.031 seconds.