Search code examples
tfsazure-devopsvstestmspec

Can you use MSpec's "Tags" attribute with TFS Build?


My team writes unit and integration tests for each service we write. I am trying to use MSpec's [Tags("CIOnly")] attribute which I thought was supposed to behave similar to the [TestCategory] attribute for MSTest so we can filter out only tests with the CIOnly attribute but I'm not 100% sure how to get these tags to work correctly with our CI Builds in TFS.

Does anyone know if this is possible? I've tried /TestCaseFilter:Tags="CIOnly" but it doesn't appear to be filtering correctly.


Solution

  • Can you use MSpec's “Tags” attribute with TFS Build?

    I am afraid you can do this at this moment.

    Just like jessehouwing pointed, this TestCaseFilter is not supported by MSpec now, which is scheduled for milestone 2.0.0:

    https://github.com/machine/machine.specifications/pull/352

    You can track this thread and check the feedback.

    Hope this helps.