简体   繁体   中英

Is it possible to make ReSharper to only run tests with some category in all test projects of my solution?

There is a way but it's bad and I am looking for something cleaner.

I can go to menu and select Run All Test in Solution . This brings all tests to the session. But not all our tests are runnable -- there is a set of tests that designed for debugging and integration. Such tests have a different category.

My goal is to run only all tests in solution that have a specific category. For that I was hoping to make ReSharper scan my solution, apply filter and then run the resulting set.

Is that possible?

When you have a test or test fixture that also has a category applied, you can click the gutter icon and the category is shown as a sub-menu, with options to run all, debug all and so on.

Or, you can go to the unit test explorer (ReSharper -> Unit Tests -> Unit Tests) and group by category. Highlighting the category you want and clicking run, or right clicking will run just those tests.

You can also group results in the Unit Test Sessions window by category, and again, just run the category.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM