View all web browser and mobile devices available in our cloud-based test lab.
The Appium community has released e a transformational version update after several years of maintaining and building the Appium 1.x versions. Appium 2.0 is a whole new technology that will allow test engineers to cover not only mobile applications, but also desktop apps, Flutter apps, and more.
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. Appium 2.0 is the latest Appium release.
Let’s explore the core new features that are part of the Appium 2.0 release and then dive into how to get started with testing your mobile app with the new framework.
Related Resources >> How to Test Network Virtualization With Perfecto and Appium
Here are some of the exciting new features of Appium 2.0:
To migrate your test code from Appium 1.x to Appium 2.x, please refer to this useful guide that walks through some potential breaking changes and other useful tips.
The current Appium Desktop tool is still available but is now being released in two separate packages:
The first step to getting started with the new Appium 2.0 framework is to install it.
Installing It can be done through the following node package install command:
npm install -g appium@next
After the installation, you would need to install the relevant driver/s for your app under test. Appium 2.0 decouples its supported WebDrivers, hence, you can choose which to install. You can install a single driver or multiple ones.
As an example, to install the Android uiautomator2 driver, please run the following command from the Appium home directory:
appium driver install uiautomator2
Assuming a successful installation of the Android driver, you should see the following prompt on your command line tool or IDE (e.g., VS Code).
Running the Appium driver list command after the above installation would display the list of available drivers with their status (e.g., Android is installed).
In addition, to view the list of plugins available to be used with Appium 2.0, run the following command:
appium plugin list
Installing a specific plugin is done via the following command:
appium plugin install images
To simply kick off the Appium server, run the Appium command:
appium server -pa /wd/hub
The above will launch the Appium server allowing you to than start your test from your IDE.
The test below is built using WebDriver.IO framework, therefore, you will also need to install this framework via the following command:
npm install webdriverio
The test will install on an Android virtual device, or a cloud based device the android APK binary, then launch the app and type ‘Hello World!’ into the text box and validate that the string is indeed available as expected.
To launch the above test after configuring properly both the path to the APK and the mobile platform under test, simply run the node command as follows:
After running the execution command and launching an Android emulator using the Android SDK AVD manager that comes with Android Studio IDE, you should get the following result:
In the above screenshot there are three main windows:
To learn more about Appium 2.0, and to properly set up your Appium environment, please refer to the Appium documentation.
Perfecto and Appium have a seamless integration. Teams can create, run, and analyze your test automation with Appium on real devices in the Perfecto cloud.
With Perfecto and Appium for testing mobile applications, you’ll be able to:
Try Perfecto and Appium today with our free trial, or schedule a custom demo with one of our automation experts to see how testing with Appium and Perfecto can benefit your organizations.
DevOps Chief Evangelist & Sr. Director at Perforce Software, Perfecto
Eran Kinsbruner is a person overflowing with ideas and inspiration, beyond that, he makes them happen. He is a best-selling author, continuous-testing and DevOps thought-leader, patent-holding inventor (test exclusion automated mechanisms for mobile J2ME testing), international speaker, and blogger.
With a background of over 20 years of experience in development and testing, Eran empowers clients to create products that their customers love, igniting real results for their companies.