当前位置:网站首页>Appium automation test foundation - Summary of appium test environment construction
Appium automation test foundation - Summary of appium test environment construction
2022-07-05 06:03:00 【Test - Eight Precepts】
1、Appium The overall idea of building test environment
(1)Android Test environment construction
Android The test 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 Here you are. Provide Development 、 What's necessary for testing Android API Class library .
- Android Simulator : It's actually a cell phone , Let's show you the effect .
(2)Appium Test environment construction
Appium The test environment needs to be built
- Appium Server:
yes Appium At the heart of , Provides a set of REST API Of Web The server .
Appium Received client connection 、 Monitoring command , Then execute these commands on the mobile device , Finally, put the execution results in HTTP The response is returned to the client .
Can pass Node.js install , It can also be done through Appium Desktop start-up Appium Server service . - Appium Clients:
appium The government provided a set of Appium client, Covering multiple languages ruby/java/python etc. ,
During the test , Generally use these client Library to replace native webdriver library .
Let's make it easier to write test cases with better readability . - Devices:
It's our mobile device , It can be a real mobile phone , Or on the computer Android Simulator .
(Android Simulator we finished in the last step )
(3) Build the environment for testing the scripting language
for example :Pyhtonj、Java And so on .
To use Pyhton Language to write our test script , Just build Python Language development environment , Including development tools .
To use Java Language to write our test script , Just build Java Language development environment , Including development tools .
2、Appium stay Android End sum IOS End workflow
(1)Android
stay Android End ,Appium be based on WebDriver agreement , utilize Bootstrap.jar, Finally, by adjusting ⽤ use UiAutomator The order of , Realization App Automated testing .UiAutomator The test framework is Android SDK Self contained App UI automated testing Java library .
In addition, due to UiAutomator Yes H5 Limited support for ,Appium Introduced chromedriver as well as safaridriver Based on H5 Automation .
appium stay android End workflow
- client The end is us
test script(webdriver The test script ). - The middle is started Appium Service for ,Appium At the service end, a Server(4723 port ), Follow selenium Webdriver The test framework is similar to , Appium⽀ Standard
WebDriver JSON Wire Protocol.
Here it provides a set of REST The interface of ,Appium Server receive webdriver client standard rest request , Parse request content , transfer ⽤ Respond to the operation with the corresponding framework . - appium server Will forward the request to the middleware
Bootstrap.jar, It is to use java Written , Installed on the phone Bootstrap monitor 4724 Port and receive Appium The order of , Finally, by adjusting ⽤ useUiAutomatorTo achieve . - Last
BootstrapWill be returned to the execution of Appium server. - Appiumserver Then return the result to Appium client.
(2)ios
stay IOS End ,Appium Also make ⽤WebDriver A set of agreements for .
And Android The difference between the end-to-end test framework is ,appium ios Encapsulates the apple Of Instruments frame , Mainly used Instrument Inside UI Automation(Apple Of ⾃ Automated testing framework ), And then put... In the device ⼊ Enter into bootstrap.js Into the ⾏ Line monitoring .
appium stay ios End workflow
- client End Is still
test script(webdriver The test script ). - In the middle is starting Appium Service for ,Appium At the service end, a Server(4723 port ), Follow selenium Webdriver The test framework is similar to ,Appium⽀ Standard
WebDriver JSON Wire Protocol.
Here it provides a set of REST The interface of ,Appium Server receive webdriver client standard rest request , Parse request content , transfer ⽤ Respond to the operation with the corresponding framework . - appium server call
instruments.jsstart-up ⼀ One socket server, At the same time, a sub process is separated ⾏instruments.app, take bootstrap.js( OneUIAutomationScript ) notes ⼊ In device⽤ To interact with the outside world - Last Bootstrap.js Will be returned to the execution of Appium server
- Appium server Then return the result to Appium client.
(3) summary :
So we can see android And ios The difference lies in Appium Forward the request to bootstrap.js perhaps bootstrap.jar.
Then from bootstrap drive UIAutomation and UiAutomator Go to Devices Complete specific actions on .

3、ADB Execution principle and Appium Execution principle
(1)ADB principle :
ADB Schematic diagram of simple model ( follow 12345 Step walk )

(2)ADB Refer to the actual operation principle diagram

(3)Appium principle
Appium Simple schematic diagram ( Follow the serial number 12345678 go )

(4)Appium Principle actual reference diagram ( Combined with simple schematic diagram )

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


边栏推荐
- Daily question 1688 Number of matches in the competition
- Kubedm series-00-overview
- Daily question - Search two-dimensional matrix PS two-dimensional array search
- Typical use cases for knapsacks, queues, and stacks
- 【实战技能】如何做好技术培训?
- 1.14 - 流水线
- [jailhouse article] jailhouse hypervisor
- Palindrome (csp-s-2021-palin) solution
- 1996. number of weak characters in the game
- 全排列的代码 (递归写法)
猜你喜欢

F - Two Exam(AtCoder Beginner Contest 238)

Typical use cases for knapsacks, queues, and stacks

RGB LED infinite mirror controlled by Arduino

Full Permutation Code (recursive writing)

1.14 - 流水线

【Jailhouse 文章】Performance measurements for hypervisors on embedded ARM processors

【实战技能】非技术背景经理的技术管理

【Jailhouse 文章】Look Mum, no VM Exits

Sword finger offer 06 Print linked list from beginning to end

Sword finger offer 04 Search in two-dimensional array
随机推荐
CF1637E Best Pair
数据可视化图表总结(二)
leetcode-31:下一个排列
1040 Longest Symmetric String
Control unit
Introduction to convolutional neural network
Daily question 2006 Number of pairs whose absolute value of difference is k
Solution to the palindrome string (Luogu p5041 haoi2009)
过拟合与正则化
Graduation project of game mall
数据可视化图表总结(一)
【Rust 笔记】14-集合(下)
1040 Longest Symmetric String
Educational Codeforces Round 107 (Rated for Div. 2) E. Colorings and Dominoes
EOJ 2021.10 E. XOR tree
R语言【数据集的导入导出】
Sword finger offer 06 Print linked list from beginning to end
shared_ Repeated release heap object of PTR hidden danger
The connection and solution between the shortest Hamilton path and the traveling salesman problem
1.13 - RISC/CISC