Code coverage tool for Xamarin.Android unit test app

I am developing a library which contain some custom views for Xamarin.Android platform and writing unit test scripts using Xamarin.Android Unit Test (Xamarin.Android.NUnitLite) project. Also, I have automated to run unit testing in my continuous integration by following the steps provided in below page.

https://developer.xamarin.com/guides/android/troubleshooting/questions/automate-android-nunit-test/

Now, I would like to check the percentage of code covered by the unit test scripts. Is there any tool available that meets my requirement?

Note: I have found few suggestions in this thread, but none of them helps me. Since, those are used to run and check the code coverage of the scripts based on nunit and not based on TestInstrumentation (Maybe I am wrong).

Please let me know if you need any other details about this requirement.

Thanks.

Posts

  • amaljayarajamaljayaraj INMember

    My team is also trying to measure code coverage for Xamarin.Android Unit Test (Xamarin.Android.NUnitLite).

    Any suggestions will be very helpful.

    Thanks

  • RishubNagpalRishubNagpal USMember ✭✭

    What we use right now is not ideal, but due to the limited options for .NET code coverage mono, it is the best we can do.

    We build our Xamarin app and NUnit tests on a Mac OS X server which hosts a Windows VM. The build is done in a shared folder between the mac and the windows VM; when the build is completed, the build script running on the mac ssh's into the windows VM to run OpenCover on our assemblies and we publish those results

  • arthurd2arthurd2 GBMember ✭✭

    I have actually been working on an extension for this the past couple of weeks.
    Its still early stages, but might work for you:

    github.com/ademanuele/VSMac-CodeCoverage

    (sorry for the broken link, I haven't posted enough on this forum yet.)

Sign In or Register to comment.