NUnit Test Adapter for Visual Studio

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

Reported by Anders Gustafsson on 2012-08-06
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
NUnit Test Adapter
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.

Related branches

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
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!!

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

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.

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.

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.

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  Edit
Everyone can see this information.

Other bug subscribers