Not possible to include or exclude tests based on [Category] attribute

Bug #1033623 reported by Anders Gustafsson
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
NUnit Test Adapter
Fix Released
Wishlist
Charlie Poole

Bug Description

An important feature in the console and GUI test runners is to filter out which tests to be executed by including or excluding specific categories. This feature currently seems to be missing in the NUnit Test Adapter.

Tags: feature

Related branches

Revision history for this message
Charlie Poole (charlie.poole) wrote :

This depends on a feature in Visual Studio, which is not yet present. Once VS is able to group tests for execution, we'll do a new release of the NUnit test adapter that supports it.

Changed in nunit-vs-adapter:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Aaron Stainback (acehack) wrote :

This is avialable in VS2012 RC\RTM you can impliment ITestCaseFilterExpression or take advantage of the existing MS one as outlined here. http://blogs.msdn.com/b/vikramagrawal/archive/2012/07/23/running-selective-unit-tests-in-vs-2012-rc-using-testcasefilter.aspx

Please add this, I need it bad!!

Revision history for this message
Charlie Poole (charlie.poole) wrote : Re: [Bug 1033623] Re: Not possible to include or exclude tests based on [Category] attribute

As far as I can tell, there is no way for the user to specify the filter
to be used when running in the Unit Test Window. If you know how,
please let me know and I'll see what gets passed into the adapter.

Charlie

On Fri, Aug 24, 2012 at 11:06 PM, Aaron Stainback <email address hidden> wrote:
> This is avialable in VS2012 RC\RTM you can impliment
> ITestCaseFilterExpression or take advantage of the existing MS one as
> outlined here. http://blogs.msdn.com/b/vikramagrawal/archive/2012/07/23
> /running-selective-unit-tests-in-vs-2012-rc-using-testcasefilter.aspx
>
> Please add this, I need it bad!!
>
> --
> You received this bug notification because you are subscribed to NUnit
> Extended Testing Platform.
> https://bugs.launchpad.net/bugs/1033623
>
> Title:
> Not possible to include or exclude tests based on [Category] attribute
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/nunit-vs-adapter/+bug/1033623/+subscriptions

Revision history for this message
Charlie Poole (charlie.poole) wrote :

I now understand that there's a VS console runner I can use to select categories. I'll check that out for testing this.

It does seem like a big hole in the feature set that you can't yet do it in the Gui.

Revision history for this message
Charlie Poole (charlie.poole) wrote :

Turns out we don't need custom filters to do this. The next update from VS will have the ability to group and filter by 'traits' that we provide, based on our own properties and categories.

Revision history for this message
Mark Hubis (mhubis) wrote :

Does this apply for filtering tests when using Visual Studio Test Runner? Team Foundation Server uses Visual Studio Test Runner and the NUnit Test Adapter to execute NUnit tests. The TFS build configuration tool allows a test case filter to be specified. This allows me to specify “TestCategory=ContinuousIntegration” to run a select set of tests when a check-in occurs to TFS. The link Aaron Stainback provides above shows how to enable this functionality within the adapter.

This functionality is crucial for working with TFS builds.

Revision history for this message
Charlie Poole (charlie.poole) wrote :

Yes, as I understand it the VS test runner should recognize the same tests as soon as NUnit provides the info about what categories are available.

Changed in nunit-vs-adapter:
assignee: nobody → Charlie Poole (charlie.poole)
milestone: none → 0.93
Changed in nunit-vs-adapter:
status: Triaged → Fix Committed
Changed in nunit-vs-adapter:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.