The Secret of MQC Functional Testing (2) - Appium Environment Construction

This chapter will introduce how to build and install the development environment of Appium, mainly on the Windows platform. The relevant environment required by mac or linux is the same as that of Windows. It is not difficult to build the environment itself. If you encounter problems, you can try more. .

related dependencies

Appium is an open source tool for automated testing on the mobile side. Appium follows the following 4 design philosophies:

  1. You shouldn’t have to recompile your app or modify it in any way in order to automate it.
  2. You shouldn’t be locked into a specific language or framework to write and run your tests.
  3. A mobile automation framework shouldn’t reinvent the wheel when it comes to automation APIs.
  4. A mobile automation framework should be open source, in spirit and practice as well as in name!

Compared with some other functional testing tools, Appium can directly test native applications without SDK or compilation; it can run on windows, mac, linux and other platforms; it can support PHP, Python, Ruby, C#, Clojure, Java , Objective-C, JavaScript, Perl and other development languages; can support functional testing of iOS and Android applications at the same time. Appium is one of the most active open source projects for mobile testing because of its power and convenience.

Appium server

Appium is a mobile testing tool, so the sdk of Android and iOS is essential.

1. Go to https://developer.android.com/studio/index.html to download android sdk, if you don't want to download android studio, you can slide to the bottom and find the command line tool only

1

2. To test iOS applications, it is recommended to install the development environment of XCode 8 and above.

Appium server is a server written in Node.js. We can compile from source or install directly from NPM.

1.到Nodejs官网下载最新版本的NodeJs并直接安装。

2.使用 npm 命令直接安装 appium 工具

npm install -g appium

When installing appium through npm, you may encounter some problems such as mirror address connection timeout and appium startup permission error. At the same time, you need to add some parameters when starting appium from the command line. For beginners, we recommend using appium's desktop client tool. The Appium desktop client encapsulates all the dependencies to run the Appium server without worrying about how to install Node.js. It also includes an Inspector tool that can help you inspect the UI hierarchy of your application and make it easier to write test cases.

1. Go to https://github.com/appium/appium-desktop/releases/tag/v1.2.0-beta.1 to download the latest  appium client. At present, appium-desktop provides the function of automatic update, so there is no need to worry about the update of appium-server anymore. 
2. The latest desktop client startup interface is as follows, specify Host to the local, set a free port (default 4723) to start appium-server

2

Appium client

Appium Client supports most languages, including Java, Ruby, Python, PHP, JavaScript and C#. These libraries implement Appium's extensions to the WebDriver protocol. When using Appium, you simply use these libraries in place of the regular WebDriver library.

  1. Java development related dependencies can be found at  https://github.com/appium/java-client/blob/master/docs/Installing-the-project.md  ;
  2. Python development related dependencies can be downloaded and installed at https://pypi.python.org/pypi/Appium-Python-Client.

A good start is half the success. Any framework needs to start from building an environment. If you encounter problems, you should use various search channels to solve them. I believe that building an appium environment will not be difficult for everyone.

Original link: https://yq.aliyun.com/articles/183662?spm=5176.8091938.0.0.VTQK9r

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326426400&siteId=291194637