当前位置:网站首页>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 ⽤ useUiAutomator
To achieve . - Last
Bootstrap
Will 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.js
start-up ⼀ One socket server, At the same time, a sub process is separated ⾏instruments.app, take bootstrap.js( OneUIAutomation
Script ) 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
边栏推荐
猜你喜欢
Wazuh开源主机安全解决方案的简介与使用体验
EOJ 2021.10 E. XOR tree
2017 USP Try-outs C. Coprimes
【Jailhouse 文章】Look Mum, no VM Exits
MIT-6874-Deep Learning in the Life Sciences Week 7
Sword finger offer 04 Search in two-dimensional array
Sword finger offer 05 Replace spaces
1.13 - RISC/CISC
A misunderstanding about the console window
Introduction and experience of wazuh open source host security solution
随机推荐
In this indifferent world, light crying
Sword finger offer 53 - ii Missing numbers from 0 to n-1
Simple knapsack, queue and stack with deque
CCPC Weihai 2021m eight hundred and ten thousand nine hundred and seventy-five
Little known skills of Task Manager
QQ电脑版取消转义符输入表情
API related to TCP connection
RGB LED infinite mirror controlled by Arduino
打印机脱机时一种容易被忽略的原因
Smart construction site "hydropower energy consumption online monitoring system"
可变电阻器概述——结构、工作和不同应用
CF1634 F. Fibonacci Additions
Some common problems in the assessment of network engineers: WLAN, BGP, switch
wordpress切换页面,域名变回了IP地址
R语言【数据集的导入导出】
Sword finger offer 58 - ii Rotate string left
QT判断界面当前点击的按钮和当前鼠标坐标
Configuration and startup of kubedm series-02-kubelet
2022 pole technology communication arm virtual hardware accelerates the development of Internet of things software
Annotation and reflection