← Back to team overview

nunit-core team mailing list archive

[Bug 692612] Re: Feature request: Provide interface to query selected categories

 

** Changed in: nunitv2
       Status: New => Triaged

** Changed in: nunitv2
   Importance: Undecided => Low

** Changed in: nunitv2
    Milestone: None => 2.6.0

-- 
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.
https://bugs.launchpad.net/bugs/692612

Title:
  Feature request: Provide interface to query selected categories

Status in NUnit V2 Test Framework:
  Triaged

Bug description:
  Please implement a feature that will provide a list of which
  categories have been chosen for the test run (using the include list).

  Here's a code sample of how this could be used in future:

  TestContext.SelectedCategories would offer a collection indicating
  which categories were selected.

  [Test]
  [Category("long")]
  [Category("short")]
  Public void SomeTest()
  {
  	List.Add(item1);
  	List.Add(item2);
  	If(TestContext.SelectedCategories.Contains("long"))
  	{
  		List.Add(item3);
  		List.Add(item4);
  ...
  		List.Add(itemN);
  	}
  	ProcessList(List);
  } 

  Depending on the content of the list, this test might either take an
  hour (full scope) or 2 minutes (reduced scope).

  This feature request has been filed as a result of a discussion in NUnit discuss group:
  http://groups.google.com/group/nunit-discuss/browse_thread/thread/79a899b9c37866df



References