当前位置:网站首页>Appium automation test foundation - mobile end test environment construction (I)

Appium automation test foundation - mobile end test environment construction (I)

2022-06-24 10:29:00 Test - Eight Precepts

IOS The phone must be Mac It can only run under the system , So we test the mobile terminal with Android Mobile phones, for example .
( One )Android Introduction to operating system

1、Android The system was born

  • 2003 year ,Andy Rubin Et al. Android company , And set up Android The team .
  • 2005 year 8 month 17 Japan ,Google Low key acquisition of the establishment of only 22 Months of high-tech enterprises Android Its team . Andy Rubin became Google Vice president of Engineering , Continue to be responsible for Android project .
  • 2007 year 11 month 5 Japan , Google is officially showing off this model called Android Operating system of , And on that day Google announced the establishment of a global alliance , And then to Apache The licensing method of free open source license , Released Android Source code .
  • 2008 year 9 month , Google has officially released Android 1.0 System , This is also Android The earliest version of the system .
  • 2009 year 4 month , Google officially launched Android 1.5 This kind of mobile phone .

2、Android Structure of the system

  • Application layer :
    Provides some core application packages , Used to store applications , main interface 、 Contacts 、 Telephone 、 browser 、 Calendar, etc .
  • Application framework layer :
    You can directly use the components provided by the framework for rapid application development , We can also achieve personalized expansion through inheritance .
  • System library and Android Runtime environment :
    System library is the support of application framework , Is to connect the application framework layer with Linux Important link of kernel layer .
    When the program is running, it mainly executes the core library and Dalvik Virtual machine has two parts .
  • Linux kernel :
    by Android The various hardware of the device provides the underlying driver .

We do tests , The focus is more on the application layer . Here's the picture :

3、Android The overall idea of building test environment

Our goal is Android test , So the environment needs to build three environments ,Java,AndroidSDK,Android Simulator . Why install these three environments ?

  • Java:Android The language used in the application layer of is Java, So we need to use Java Environmental Science .
  • AndroidSDK:Android SDK To provide you with development 、 What's necessary for testing Android AP Class library .
  • Android Simulator : It's actually a cell phone , Let's show you the effect .

Add :
Java It's Android's development language .
Android Its essence is in the standard Linux Added... To the system Java virtual machine Dalvik, And in Dalvik A virtual machine has been built Java Of application framework frame , All applications are based on Java Of application framework Above the frame . and application framework The framework needs to use Java call , So we need to build Android The test environment of system mobile phone needs Java Environmental Science .
To run Android mobile phone , There must be support Android Environment .

( Two )Java Environmental installation

4、JDK8 download

Official download address :https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html
Domestic Download Image :

5、 install JDK8

Double click to run and download ok JDK Software .

(1) install JDK Guidance begins , Click next .

(2) Custom installation path .

(3) Start installation JDK.

(4) install JRE, And choose the installation location .

(5) Installing JRE, Wait for the installation to complete .

(6)JDK and JRE installation is complete , Click Close .

(7) verification , Enter... At the command prompt java -version see Java Environment installed successfully .

There is Java Version information for , That means the installation is successful .

6、 To configure Java environment variable

To configure Java The purpose of environment variables is that they can be executed and used in any directory Java Commands and tools . Easy to compile and run on the console Java Program , You don't have to go into Java The program directory of ( The installation directory ) Inside to run .
for instance , When you need to be right Java When program files are compiled and run , You can use it in any directory java.exe and javac.exe Tools , Compile and run the file , There is no need to put the program file in java.exe and javac.exe In the directory .
(1) My computer --> Right click --> attribute , Then select advanced system settings --> environment variable .

(2) newly added JAVA_HOME environment variable .

Click ok .
explain :

    1. JAVA_HOME The variable value of environment variable is located when JDK The root of the installation directory , That is to say bin The next level of a directory .( standard )
    2. Defined in the user environment variables in the upper part , Only the current user is in effect . Configured in the following system environment variables , Effective for all users in the system . Our own computers , Just define it in the system environment variable .

(3) hold JAVA_HOME Environment variable added to Path In the environment variables .

explain :JDK It includes JRE, If you need it, you can put JRE The environment of individual join in Path In the environment variables .

(4) verification , Enter... At the command prompt javac see Java Whether the environment variable is configured successfully .
When there is information, it proves that Java Environment variable configuration succeeded .

a key : Supporting learning materials and video teaching

So here I have carefully prepared the detailed information of the above outline in The link below is as follows

 

原网站

版权声明
本文为[Test - Eight Precepts]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/175/202206240921118054.html