So our tests are grouped by category in order to help us run them more quickly, sorted into 'No Traits' (which don't hit the database, and so are fast), 'Integration' (which do hit the database, and so are not particularly fast) and 'Slow' (which hit the database and are also very, very slow).
If you've done some work that might affect Integration tests, you may think you need to select Integration and No Traits, right click, and choose 'Run Selected Tests'. I certainly did.
Unfortunately, I was wrong.
You see, a Test can have multiple traits (which are called 'categories' from within MSTest), as you can see below:
This means that selecting the Integration tests and choosing 'Run selected tests' will include all of the Slow tests (as they're in both categories).
Fortunately, the Test Explorer search box allows us to search on Traits (aka Categories), and it also supports negative searching. So we can do the following:
This subtracts any tests with 'Slow' as a Trait from the results list, allowing you to finish running these tests before the heat death of the universe.
Comments
0 comments
Please sign in to leave a comment.