Visual Studio Run Method and Utility Tests

I use XUnit and Resharper to run my tests. In this project, I usually have several utility tests that are not actually tested, but exist cleanly, so I can easily execute the code. For example, I have a test that outputs my NHibernate mappings (I use Fluent NHibernate) to a temporary directory. I don't like these tests, is there a better way to just “run the method” besides using testrunner?

+3
source share
2 answers

If you have TestDriven.net, all you have to do is just click on the method and it will start. You do not need to decorate the method with attributes Testor TestMethodor something like that.

testdriven.net has a personal version that is free.

+2
source

If your test runner insists that you have a marker attribute for a method that allows you to execute it, all you can do is follow this requirement. (As another answer says, TD.NET works with you on this)

So, assuming you need to have some class of FactAttributedistributed type, the next interception point is to dynamically cause the task to Skipped at runtime a la my examples in this xUnit.net function request

, , devenv.exe , , . , Resharper , , ? (TeamCity [ , R #] - . xunit MSBuild .)

+1

Source: https://habr.com/ru/post/1720450/


All Articles