On the 6th of March, 2018, the NativeScript team held the NativeScript Air #6 on UI Testing {N} applications with nativescript-dev-appium plugin. In this episode, our host Sebastian has welcomed two of the NativeScript Core Team Engineers: Svetoslav and Vasil, as well as Jérémy, who is a NativeScript developer who recently blogged on "How to Start Testing Your NativeScript Apps Properly".

The content

In order to help the wide audience, we covered a range of topics:

setup - adding the nativescript-dev-appium as development dependency to your project and having installed appium globally could not be enough for successfully executing your tests. For the full list of required packages and how to install them, please, refer to the Setup section of the repository’s README.md file.

demos - apart from the official demos demonstrating the nativescript-dev-appium plugin basics as configurations, find strategies, locators, etc. and the page object pattern, in the Demos section of the repository’s README.md file are listed all tests which currently execute in the NativeScript Continuous Integration by the plugin, demonstrating good test practices, data driven approach, image comparison of elements and more.

functionality to compare sceenshots of the app during testing vs the expected sceenshots,

Screen comparison report image: left - actual, middle - diff and right expected images.

functionality to turn on/off the Don’t keep activities setting in the Developer options for Android,

functionality to send the currently active app to the background

functionality to verify animations/transitions - the latest feature under development is ability to be able to compare frames from a video as images, which allows you to verify if an animation/transition has performed properly. This logic is going to take part of the frame-comparer package and here is an experimental demo of it.

We hope this episode helps you get started, write and execute functional tests of your application. Don’t hesitate to give a try to the latest and greatest of the nativescript-dev-appium plugin and let us know any comments/feedback you might have in the plugin’s repository.

Resources

Coming next

{N}air #7 - Building Attractive UIs in NativeScript

If you are after making your apps look nice and professional, then you should join us on the 20-Mar for an episode on Building Attractive UIs in NativeScript where Sebastian will host Alex Zyskind and Sean Perkins to reveal their Styling Magic Tricks - they call the best practice.

{N}air #8 - Automate UI Testing and PlayStore publishing with DevAppium, Travis and FastLane