I have a suite of automated tests (some with SpecFlow, some with NUnit), that I run as part of my TFS build (using visual studio online, with a hosted build agent).
Some of my tests (acceptance tests, not unit tests) cannot be executed on the build server, because they make an assumption about the credentials of the user logged into the system.
I want to be able to filter out these tests from my run, and run everything except for the local-only tests.
In order to achieve this, I added the [Category("LocalOnly")] attribute to the tests to be ignored by the TFS server, and set the test task in the build (new preview build mechanism) to add the following switch: /TestCaseFilter:"TestCategory!=LocalOnly".
Except it doesn't work, even though I believe it should. If I set the filter with the equals sign it runs nothing, and if I use the not-equals sign, it runs everything. It seems that the filter isn't working.
I also tried to run this locally on my box, using vstest.console.exe, with the exact same results, so this is not a problem with TFS).
According to the NUnit adapter for visual studio release notes, this has been fixed, but I see no evidence of it.
Any idea how to fix this?
Aucun commentaire:
Enregistrer un commentaire