Appium environment installation and architecture introduction

Appium Architecture

Appium Design Philosophy

  • No need to recompile or modify the application under test for automation
  • Automated mobile testing should not be limited to a certain language or a specific framework
  • Don't reinvent the wheel for automated testing on mobile
  • Mobile automation testing should be open source

Appium Architecture

The Appium  architecture diagram is as follows:

The core of Appium is a web server that provides a set of REST interfaces, receives connections from clients, monitors commands, executes these commands on mobile devices, and returns the execution results to the client in an HTTP response.

In fact, this client/server architecture opens up many possibilities. You can use any language that implements the client to write test code, you can put the server on a different machine, you can only write test code, and then use the service to execute commands.

For Android and iOS, different working engine drivers are used to realize automated testing . List of Appium engines:

Languages ​​supported by Appium

Appium supports writing test cases in the following languages:

Appium environment installation

The Appium Windows version only supports the Android system, and the Appium Mac version supports both the Android system and the iOS system. Here we only introduce the installation of MacOS system.

Appium environment dependencies

Software list:

1. Java 1.8
2. Android SDK
3. Appium Desktop

 

Java version 1.8 is recommended. The Android SDK is a development toolkit for the Android system, which contains many commonly used tools for automated testing. Appium Desktop provides services and recording functions.

Let's start the environment installation. The configuration of the following environment variables needs to be completed by opening the terminal terminal in the MacOS system. The environment variables can be configured under ~/.bash_profile. If you are using oh-my-zsh, you need to configure environment variables to ~/.zshrc.

To install Nodejs, first download Nodejs from the official website. The LTS version is recommended. The official website download address is relatively stable. Confirm that nodejs is installed correctly through the command line. Run node -v and npm -v on the command line. No error is reported and the corresponding version can be displayed, indicating that the installation is normal. You can go to the next step to install Appium server through npm. Because the source of npm is abroad, the speed of access will be relatively slow, and it will be easy to report an error and terminate abnormally, resulting in unsuccessful installation. Therefore, you can use cnpm, which is a domestic source, to install. The success rate...

Appium client installation (Python version)

If you want to be able to related packages in the code, you need to install a third-party library:

pip install Appium-Python-Client

Appium client installation (Java version)

Dependencies are loaded automatically when using build tools like Maven or Gradle.

<properties>
        ...
        <!-- 尽可能使用最新版本 -->
        <appium.version>7.3.0</appium.version>
        ...
    </properties>
 
    <dependencies>
        ...
        <dependency>
            <groupId>io.appium</groupId>
            <artifactId>java-client</artifactId>
            <version>${appium.version}</version>
        </dependency>
        ...
    </dependencies>

Finally, I would like to thank everyone who has read my article carefully. Reciprocity is always necessary. Although it is not a very valuable thing, you can take it away if you need it:

insert image description here

Software testing interview applet

The software test question bank maxed out by millions of people! ! ! Who is who knows! ! ! The most comprehensive quiz mini program on the whole network, you can use your mobile phone to do the quizzes, on the subway or on the bus, roll it up!

The following interview question sections are covered:

1. Basic theory of software testing, 2. web, app, interface function testing, 3. network, 4. database, 5. linux

6. web, app, interface automation, 7. performance testing, 8. programming basics, 9. hr interview questions, 10. open test questions, 11. security testing, 12. computer basics

These materials should be the most comprehensive and complete preparation warehouse for [software testing] friends. This warehouse has also accompanied tens of thousands of test engineers through the most difficult journey. I hope it can help you too!      

Guess you like

Origin blog.csdn.net/nhb687095/article/details/132473622