In VS2012 (RC, soon to be RTM) is it possible to be selective about the (nunit) unit tests that run after every build? I love this feature, but I have two test categories/assemblies - one for actual unit tests that are expected to run quickly, another for database scheme and test generation data. I do not want to run the latter after every build, though I'd like to make use of this functionality for regular unit tests. Is there any way of specifying categories/assemblies/etc. that should be executed upon a successful build? Thanks JP
@Gishu is correct. If you apply a filter to the Test Explorer, the runner will use the results of that filter list when choosing tests to run.
We will be continuing to add additional filter choices (e.g. Categories, Project, etc.) to the Test Explorer through and post-RTM. Stay tuned for more on this.
On the test explorer window, there is a searchbox. You can specify filters - one that looks promising is called a TestFilePath filter. (Dropdown to see available filters)
e.g. FilePath:"Transaction" filters only the tests in the Transactions.cs file. You can use this to exclude the tests in the other assembly e.g. if the folder is Unit and Database. Specifying FilePath:"Unit" should work. Give it a try..
Docs: Search for "filtering" on the page here
© 2022 - 2024 — McMap. All rights reserved.