It depends on the unit test structure you are using. Each of them provides a utility for running tests, where you can specify some parameters. It looks like this for MS Test: mstest /category:Fast A similar thing should be present in every unit test structure (NUnit, XUnit).
When you use Team City, you should carefully study your options for running unit tests and find a place where you can provide this additional parameter about the category (it is usually called “Command Line Parameters”, “Add Parameters” or something similar). I don’t remember exactly, but I think that he should be present in Team City’s built-in tasks to run tests.
Even if the built-in tasks for running unit tests do not have this function, you can always switch to the general script execution task and run something like this mstest /category:Fast .
source share