Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get ReSharper to ignore certain categories when running all tests?

I've got about 650 NUnit tests in my current solution in VS2008, but 40 of these are categorized either as "LongRunning" or "Integration". I do not want these to run every time I've done a change and run my test-suite (only when I specifically ask for it, and on the CI at set times).

Setting this up with TestDriven.Net is a cinch: Tools -> Options -> TestDriven.Net -> Exclude tests in categories

I would like to use the nice UI that comes with ReSharper, though. I've not found any way of setting up ReSharper not to run certain categories.

Has anyone done this? Can it be done?

like image 507
Tomas Avatar asked Dec 10 '09 08:12

Tomas


People also ask

What is test category?

Test category means one type of test or group of tests specified by rule under sub. (4) for similar materials or classes of materials or which utilize similar methods or related methods.

How do I ignore a test in Visual Studio?

If you want to enable or disable unit tests in Microsoft Visual Studio 2010, you can use the “Ignore” attribute. This can be used to ignore ore exclude integration tests in a nightly continuous integration build.

How does ReSharper determine code coverage?

Ctrl+U D commands. You can use this command to run coverage analysis of unit tests from the editor, from the Solution Explorer, or from unit tests sessions.

How do I run unit tests with ReSharper?

Right click on the project or solution in the VS solution-explorer and choose 'Run Unit Tests' Or go to the Resharper menu, choose Unit-Testing and choose one of the options from there.


1 Answers

See:

ReSharper | Options | Unit Testing | General | Skip tests from categories

enter image description here

Available in ReSharper 6, see here.

like image 172
Martin Doms Avatar answered Sep 19 '22 13:09

Martin Doms