0
votes

Does anyone know how to use "Test Filter Criteria" field in the "Run Functional Test" of vNext build step, to specify the categories of tests to be executed by NUnit test adapter?

When I set this field with TestCategory=CatA for example, the build fails...

(Following https://www.codit.eu/blog/2015/03/18/continuous-integration-with-javascript-nunit-on-tfsbuild-part-3-of-3-/)

Thanks!

2

2 Answers

2
votes

Hope this will help someone someday, the right way is to use the keyword "Category" Example:

(Category=CatA&Category!=CatB)|Category=CatC

enter image description here

I use here the "Run Functional Test" build step

1
votes

I think you are using the wrong build task in Vnext. To execute NUnit test in a vNext build you should ensure that appropriate tests adapters are available to agents that will run the build.

The easiest way to automate all the process is adding Nunit Test Adapter nuget package to your test project, adding a standard Nuget Reference.

Once you’ve added the package, you should see all needed assemblies under the package directory of your solution. Now you can specify the location that contains the Nunit Test Adapter directly from Build Definition using this string.

This blog describes clearly how to do this: Running NUnit Tests in a TFS 2015 Build vNext