Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a prevailing unit testing framework for the .NET Compact Framework? [closed]

I have plenty of experience with NUnit and MBUnit, but I'm new to .NET Compact Framework development and I'd like to get off on the right foot.

Is there a prevailing unit testing framework for the .NET Compact Framework, and if so, what is it?

like image 998
Hugh Avatar asked Nov 18 '08 19:11

Hugh


People also ask

What is the best unit testing framework for .NET core?

xUnit test is the best Unit testing framework for . Net programming languages like C#, VB.Net, and F#. xUnit derives its structure and functionality from SUnit of Smalltalk.

What are the frameworks used in .net unit testing?

NET Core. The three major C# Unit testing frameworks are MSTest, NUnit, and xUnit.Net.

What are the unit testing frameworks in the market for .net umbrella?

xUnit. xUnit.Net is a popular unit test framework used for test automation. 'x' in xUnit stands for the programming language for which the test framework is built i.e. JUnit for Java, NUnit for C#, etc. It is a unit test framework that is built by the creators of the NUnit framework.

Which is better NUnit or MSTest?

The main difference is the ability of MsTest to execute in parallel at the method level. Also, the tight integration of MsTest with Visual Studio provides advantages in both speed and robustness when compared to NUnit. As a result, I recommend MsTest.


4 Answers

Check out NUnitLite: http://www.codeplex.com/Wiki/View.aspx?ProjectName=NUnitLite

like image 173
Matt Lacey Avatar answered Nov 15 '22 07:11

Matt Lacey


We use MSTest under TFS (2008). The great advantage is that it runs the tests on an actual device (we run both against emulators and physical devices) and the testing is driven from the server, not the device. This means you don't have to select tests to run, etc. from a device UI (a la CFNUnitBridge), which is painfully awkward and not conducive to continuous integration.

MSTest is not a cure-all, however. It has some serious drawbacks (like debugging tests is really painful and test startup is slow), but it's better than anything else we've tried. The hope is that as MS moves forward, usability will improve and we can keep moving forward with the test framework we have.

Using anything else we find to be too risky, as many frameworks and libraries for devices tend to wither and die without some major sponsor. NUnitLite for example only has had 477 downloads and very little code churn or activity in a two-year life as of this post - that doesn't inspire any confidence that it will grow in features.

like image 22
ctacke Avatar answered Nov 15 '22 09:11

ctacke


@Simon: Modules compiled for CF.NET don't run on the desktop h/w, and therefore cannot be tested with NUnit.

like image 34
Eric Farr Avatar answered Nov 15 '22 09:11

Eric Farr


You have probably figured this out already, but with Visual Studio 2008 Professional, the "best" way is to use MSTest (I'm an NUnit guy through and through, but this is it).

Right-click on a method or class and select "Create Unit Test". That will guide you through creating the test project with all of the dependencies you need to get started.

Key point, this will run the tests on the device -- which is what you want to happen, then report the results back to you in the MSTest runner.

There are still testing issues though. I can't find any mocking framework that works with .net cf. But it is a start.

like image 37
Chris Brandsma Avatar answered Nov 15 '22 08:11

Chris Brandsma