Document how to run and add tests

Issue #19 closed
Jeremy Kolb created an issue

How does one run the tests and add new ones?

Comments (2)

  1. Guillermo GutiƩrrez

    Currently most tests are packed in a NUnit Xamarin.iOS application. To run the tests, open the solution from Xamarin Studio 5.1 or above. Then, set 'IntegrationTests.Touch-PCL' as default project.

    SQLiteNetExtensions-MvvmCross_-_______SQLiteNetExtensions_Extensions_ReadOperations_cs_-_Xamarin_Studio.png

    Run the application in the simulator or device and you should see the NUnit test runner:

    Test1.png

    Hit 'Run Everything' and you'll see all the traces in the console indicating which tests are being executed. When all of them are run, you'll see the results in the App:

    Test2.png

    Test3.png

    In NUnit tests are discovered on runtime: all classes annotated with [TestFixture] attributed is a Test suite, and all methods of that class annotated with a [Test] attribute is a test case.

    There's also NUnit runners for Android, Windows Phone, etc. So the tests cases can be reused between platforms.

    Hope it helps.

  2. Log in to comment