samedi 6 août 2016

Xamarin Android unit tet automation

I am new to xamarin. Please help me here.

I am using NUnitlite for unit tests in Xamarin android project. I Can run the unit tests in debug mode on device or emulator by starting the project in VS, which will install the application and I can run tests on device/emulator.

I need to automate this in build process. How to automate this Nunitlite Testcases..?

I am following below approch.

  1. Create a class extending from Xamarin.Android.NUnitLite.TestSuiteInstrumentation, and add the test assembly in OnCreate method.

  2. Install the app in device.

  3. Run the test cases using below command from ABD.

adb shell am instrument -w com.package,mypackage/app.tests.TestInstrumentation

Is this correct approach .? Or can this be done any simpler way from Nunitlite itself..?

Aucun commentaire:

Enregistrer un commentaire