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?

  • remove the spaces and see if that helps TestCategory=SmokeTest&TestCategory!=Remote.chrome This works for me with Nunit 2. – tehbeardedone Mar 23 '17 at 18:18
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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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