Mobile-Automation automation (Android&ios)--appium

Source: Internet
Author: User
Tags appium

Appium-python Mobile Terminal Automation environment construction

Appium Introduction

Appium is an open-source, cross-platform testing framework that can be used to test native and hybrid mobile applications. Appium supports iOS, Android, and Firefoxos platforms. Appium uses Webdriver's JSON wire protocol to drive the UIAutomation Library of the Apple system and the Uiautomator framework of the Android system. Appium support for iOS systems thanks to Dan Cuellar's research on iOS automation. Appium also integrates the selendroid to support the old Android version.

Two benefits of Appium for automated testing

(1) Appium uses standard Automation APIs on different platforms, so there is no need to recompile or modify your application when cross-platform. Here, cross-platform means that test scripts can be written in the same way on different systems, rather than the test scripts for Android that can be applied to an iOS system without modification. In fact, Android and iOS apps almost need to be written independently.
(2) Appium supports all languages supported by selenium Webdriver, such as Java, Object-c, JavaScript, PHP, Python, Ruby, C #, Clojure, or the Perl language, and can be used selenium The Webdriver API. Appium supports any kind of test framework. If you only use Apple's uiautomation, we can only use JavaScript to write test cases, and only use instruction to run test cases. Similarly, if you only use Google's uiautomation, we can only write test cases in Java.

System Requirements for Appium

Android automated testing can be done on Windows, Mac, Linux, and requires tools such as Android Sdk,node installed. iOS automation, which requires Xcode support, can only run on Macs and requires the installation of tools such as Xcode,node. In addition, since the bottom of Appium iOS Automation is UI Automation, you must build an iOS development environment before using Appium.

How the Appium works

Http://www.cnblogs.com/yulei126/p/6804216.html

Second, the test environment to build:

1, install pycharm;----Python development debugging tools. :https://www.jetbrains.com/zh/pycharm/specials/pycharm/pycharm.html?utm_source=baidu&utm_medium=cpc& Utm_campaign=cn-bai-br-pycharm-ex-pc&utm_content=pycharm-pure&utm_term=pycharm PS:python Debugging tool, According to their own circumstances can choose not to download;

2. Install python; Download the website; default installation

3. Verifying Python ps:python3 verification python3-v

4. Download java, download the website;

5, configure environment variables. Java_home Java_home-bin;ps:win and Mac, see for yourself how to configure environment variables

6. Verification Java-version

7. Download the SDK

8. Configure the SDK environment variables. Android_home Android_home-tools Android_home-platform-tools;

9, ADB verification android-sdk;ps:adb Android remote debugging bridge, for debugging and placement equipment, push code. Must be installed;

10, install the node. JS Chinese network address: http://nodejs.cn/node.js; Download the installation package, one-click installation;

11, verify node Node-v npm-v. Ps:appium Bottom is node development, need to install

12, install Appium. : https://github.com/appium/appium-desktop/releases/tag/v1.2.4; Download the installation package, install and configure environment variables

13. Install Appium-doctor Ps:mac-end sudo npm install appium-doctor-g

14. Verification Appium-doctor

15, install Appium client library, PS: Select the corresponding development language client library, http://appium.io/downloads.html;

The environment variables are as follows:

So far above the android end;

iOS will need to install some dependencies;

1, install Xcode;app store download;

2, Installation Carthage

The Install command is
Brew Install Carthage

It's going to be a privilege problem. direct command to execute prompt

sudo chown-r $ (whoami)/usr/local/var/homebrew

And then it's OK to install again.

3, installation Webpack

The Install command is

NPM i-g Webpack
Most of the pits encountered in this step are mostly permissions issues. If you see the Permission God horse drops error you are 777 or sudo understand it is necessary to execute success can not have error AH warn God horse drop because this thing with webdriveragent related if I'm going to be webdriverexception after this. 4, installation of webdriveragent dependent Appium from the 1.6.x version of the control positioning strategy has a big change is that it gave up uiautomation and enabled XC The uitest mechanism is therefore more dependent upon the installation to enter the following path
cd/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/webdriveragent/
Create a path
Mkdir-p Resources/webdriveragent.bundle
Execute a command
sudo./scripts/bootstrap.sh-d



After all the installation completes, the terminal executes the apium-doctor all tick on OK. Such as:

Mobile-Automation automation (Android&ios)--appium

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.