Can I create a wrapper around NUnit, MbUnit, xUnit, or another testing environment?

How to create a wrapper around the testing framework? We still don't know what kind of testing framework will be used, but I need to start writing unit tests. With this question, I want to know how I can switch from NUnit to mbUnit, xUnit, or even to MSTest.

+3
source share
2 answers

You can create a wrapper, but I think you can use your time a lot better. I would say that choosing the simplest one (my personal favorite is the NUnit War-horse) that suits your needs - the new framework adds functionality that will help you write more complex test devices.
However, I appreciate simplicity compared to "flexibility." In the future, if you want this β€œcool function X in the testing platform Y” you can either write this specific test device using Y. (you could also transfer all the test fixtures to use Y for consistency - but time is always scarce) . Switching between 2 test modules is usually a monotonous job (rename attributes), however some may be more useful (disclaimer: no flight time with MbUnit)

Your comment, however, bothers me a little.

  • Why the client decides the testing structure that you will use for development - this should be the choice of the development team. The client would not want you to define product requirements - he or she? The quality of the tests does not depend on the structure used, so I do not see how this affects the client.
+6
source

You can use the existing shell, which allows you to run multiple unit test frameworks, so even if you switch the frameworks, you can still use the old unit tests. For the unit test frames that you specified, I would recommend taking a look at Gallio.

From http://www.gallio.org/ ...

Gallio MbUnit 2 3, MSTest, NBehave, NUnit, xUnit.Net, csUnit RSpec. Gallio AutoCAD, CCNet, MSBuild, NAnt, NCover, Pex, Powershell, Resharper, TestDriven.Net, TypeMock Visual Studio Team System.

0

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


All Articles