C # .NET 4.0 Testing?

If I'm not mistaken, NUnit is the de facto standard for unit testing, but I just downloaded it, wrote a simple test, and then apparently I need to run the GUI and load my .exeassembly, which just failed.

I tried editing

C:\Program Files (x86)\NUnit 2.5.7\bin\net-2.0\nunit.exe.config

As suggested in this question , but that didn't work either, so I tried to download the nunit source code and compile it in vs2010, but it didn’t even compile. Unable to find punit.framework.dll. This solution says that "does not contain a definition for AllTestsExecuted", so I'm a little upset here. You might think that there will be a usable and working environment for .net 4, no?

So my question is: how do I get NUnit to work, or is there another structure that will cause me less agony?

+3
source share
6 answers

You do not need to use the NUnit GUI to run your tests. You can use TestDriven.NET from Visual Studio. Also, if you use Resharper, which has a unit test runner that also works with NUnit.

+4
source

, Microsoft Unit Testing Framework. , VS , NUnit. , NUnit defacto, - . Microsoft - Visual Studio IMHO.

+2

# ( ;-)), xUnit. , ( , , Visual Studio ..), .

+1

NUnit GUI test runner , . "". 32-, , 32- .

Testdriven.net - , NUnit GUI runner .

+1

NUnit , , -, .

, .

  • , [TestFixture] [Test] ​​ , .
  • , DLL NUnit.

GUI, , Resharper.

0

If you are using Visual Studio 2010, you can use MSTest. Just press CTRL + ALT + R and it will run your tests and show the results in Visual Studio itself.

The same tester will also work for NUnit, if I'm not mistaken.

0
source

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


All Articles