0

I am using Nunit V2.6.4 and NunitTestAdapter v2.0 to run selenium tests in visual studio 2015. We also have a build definition set up to run these tests nightly(on selenium grid)in chrome browser. I want to run a subset of these tests in IE and Firefox, so I added a Nunit Category “SmokeTest” attribute to some of the tests. Created a new build definition and included the following in the TestCaseFilter

TestCategory = SmokeTest & TestCategory != Remote.chrome 

Outcome: All tests are selected. It looks like the Testcategory filter is being ignored.

Any idea to solve this?

1
  • remove the spaces and see if that helps TestCategory=SmokeTest&TestCategory!=Remote.chrome This works for me with Nunit 2. Commented Mar 23, 2017 at 18:18

1 Answer 1

1

A quick search gave what is probably the answer:

For NUnit, you need to use Category instead of TestCategory. You may also need to remove spaces - the examples online suggest that your TestCaseFilter should be:

Category=SmokeTest&Category!=Remote.chrome

Reference: https://stackoverflow.com/questions/40249366/specify-nunit-categories-with-tfs-vnext-2015

2
  • I used the above mentioned format in the TestcaseFilter , but I got an Exception Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter.TestPlatformFormatException.
    – VSD
    Commented Feb 21, 2017 at 17:02
  • Did you install/configure NUnit correctly - it needs to be installed on your build system, as I recall.
    – Kate Paulk
    Commented Feb 21, 2017 at 18:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.