Tutorial on NUnitLite

464 views
Skip to first unread message

niko....@gmail.com

unread,
Nov 30, 2007, 3:15:43 AM11/30/07
to NUnitLite
Hi,

I'm new in NUnit and also NUnitLite. I want to implement NUnitLite for
my mobile application Unit Testing. I downloaded the v.0.2.0 but i'm
having difficulty to kick-start it. I searched the internet, all
available tutorials are for v.0.1.0 and they are not compatible.

Any pointers for me to kick start this ?

niko

Graham_Wright

unread,
Dec 1, 2007, 6:00:27 AM12/1/07
to NUnitLite
1) Open the NUnitLiteCF solution in Visual Studio 2005
2) Build the NUnitLiteCFTests project
3) Deploy and to and run your Windows Mobile device or emulator
If you are debugging then you will see a number of first chance
exceptions.
You will not see any output on the emulator or device because Windows
Mobile does not support console applications.
However you can now write your own tests and redirect the output to a
form.

4) The syntax for test suites and tests is the same in NUnitLite as it
is in NUnit so you can use the documentaion for NUNit from the
nunit.org site.

5) What is different bewteen NUnuitLite and NUnit is the way you run
tests.
There is no GUI or Console runner as part of the NUnitLite source
code.
You are expected to either embedded the tests in your application or
write a stand alone runner to load the test assemblies. In both cases
you just need to reference the NUnitLite assembly built above.

I have uploaded an example of embedding the tests in a Windows Mobile
form (NUnitLiteMobileExample.zip)

Currently at work we are using a standalone runner so we can run
multiple test assemblies on a Windows Mobile device in the same way as
the NUNit GUI. I will upload this in the next couple of days.

- Graham

Graham_Wright

unread,
Dec 1, 2007, 2:06:56 PM12/1/07
to NUnitLite
I should have explained in point 3) that although you will not see any
output a file will have been written to MyDocuments on the device or
emulator summarising the test results. This will verify that you have
built the solution correctly as all the tests for the NUnitLite
framework itself will have been run.

- Graham

Charlie Poole

unread,
Dec 1, 2007, 2:28:15 PM12/1/07
to nuni...@googlegroups.com
Thanks for covering this Graham.
I particularly like point 5, which I would have
forgotten to mention - too close to it, I guess.

Charlie

Vahan Hakobyan

unread,
Feb 13, 2015, 11:17:13 AM2/13/15
to nuni...@googlegroups.com, cha...@pooleconsulting.com
Hi Charlie, Gragham,

I want to test Silverlight projects. As a testing assembly I have created Silverlight Application in order to be able to reference to my Silverlight apps from it (From Console app. I can't reference to my projects).
I have downloaded NunitLite (from Nuget package manager and by separately as well) but I can't run them now. The 'main()' function doesn't get called here.
I wonder weather the calling 'main()' function is the only way to run my tests, why I can't specify some provider in my 'Application_Startup' function to see the runned tests.
Could you suggest me how to use NunitLite?

Thanks.
Regards, 
Vahan
Reply all
Reply to author
Forward
0 new messages