Faster Android Tests and NUnit 3

Villars

April 23rd, 2019

Xamarin.UITest is a popular C# testing framework which works great with both native and cross-platform apps, using frameworks like Xamarin. Today I’m happy to announce two updates we have made to the UITest framework, in the form of a performance boost for cloud tests and adding NUnit 3 support both locally and in the cloud.

Along with access to additional devices to run tests, an additional benefit to using Visual Studio App Center’s device cloud is the ability to take screenshots during a test and see how your app actually runs. This is a highly valuable secondary aspect to testing, ensuring images are rendered correctly and troubleshooting visual issues that may not be reflected in a test. Taking screenshots does come with a cost however, as it takes additional time to take and process the image, causing test runs to take longer.

performance improvements we have done include a rework of the foundation for Xamarin.UITest on Android, now taking in App Center has never been faster. The best part is that you do not have to change any code in your tests, just update to the latest NuGet packages and everything works out of the box. To illustrate this improvement, the screenshot service has been cut from taking 6 seconds per screenshot down to 4 seconds for a whooping 32 screenshots. That is enough pictures to compile an animated gif in less time than it took for one picture before. How does this impact actual test runs you may ask? A test suite we have takes 92 screenshots and would finish in roughly 17 minutes in the old pipeline. It is now down to 2 minutes and 42 seconds for the exact same test suite using the latest updates.

NUnit 3 Support

One of the challenges with software development is keeping dependencies up to date. It typically means additional time working on backend systems to ensure compatibility instead of working on new features. We face this on a regular basis as we strive to maintain support for the latest Android and iOS releases in our tools, which can sometimes be released with little to no notice. Since its launch, support for NUnit 3 with Xamarin.UITest has been a top request from customers and one we have wanted for some time. We are excited to report our latest update closes this gap. Now you can update your NUnit package along with UITest to the latest versions and run tests both locally and in App Center, plus have access to the updates and fixes available in NUnit 3.

We hope these updates help empower you to ship your apps with higher quality and confidence. There has never been a better time to use App Center. Sign-in to check out the latest updates, or sign up for free. We offer a free 30-day trial with our device cloud so go check it out. As always, we love to hear your feedback on what is working, and what you would like to see next. Reach out on twitter at @VSAppCenter or share your thoughts. We look forward to hearing from you.