Introduction to Native Mobile App Testing
Nightwatch enables automation testing of native mobile applications via Appium. It combines the robustness of Appium with the enhanced developer experience provided by Nightwatch. It enables end-to-end functional testing of native mobile apps on Android and iOS devices.
What is Appium?
According to the definition on the Appium website:
Appium is an open source test automation framework for use with native, hybrid and mobile web apps. It drives iOS, Android, and Windows apps using the WebDriver protocol.
While Selenium is used for automating desktop browsers, Appium can be used to automate mobile web, native & hybrid mobile apps.
In order to run Nightwatch using Appium the following requirements have to be fulfilled:
- Mac OSX - XCode w/ Command Line Tools
- Mac OSX or Windows or Linux - Android SDK ≥ 16
Don’t worry about the SDK downloads as the Nightwatch Mobile Helper will take care of it.
How does it work?
The native mobile app testing capability in Nightwatch is build with Appium under the hood.
Appium is a NodeJS based server that exposes REST APIs compliant with the W3C WebDriver protocol that wraps automation libraries from vendors (UIAutomator2/Espresso, Apple XCUITest/UIAutomation).
In an end-end scenario Nightwatch makes request to Appium server, server talks to native framework using different platform drivers for executing commands and finally returns HTTP response back to Nightwatch.
Recommended next steps
Now that you understand how mobile app testing works with Nightwatch, let's dive into the setup. We recommend you cover all the below listed topics to get a complete understanding on mobile app automated testing using Nightwatch.