当前位置:网站首页>Upgrade appium automation framework to the latest 2.0
Upgrade appium automation framework to the latest 2.0
2022-07-26 06:16:00 【51CTO】
lately , Mobile terminal Automation Test Framework Appium Started a new project Appium 2.0 , The transfer of basic functions is in full swing , And has released several beta edition . GitHub You can see all the plans of this project in the near future , Most of the original functions have been completed , There are also some minor configuration and documentation work in progress .

Appium 2.0 New capabilities
Personally, I am right Appium 2.0 Very bullish on , Although it's like airtest Such a framework is also very easy to use , however Appium 2.0 Trying to create a new cross platform testing ecosystem is still very attractive . Appium Hope that in 2.0 Several important things to do are :
- Untie all drivers. Appium 1.0 It is bound to the system , For example, Android is bound Uiautomator2、iOS The binding xcuitest, Other test drivers are cumbersome to install . Unbundling drivers after ,appium 2.0 It is very easy to add the required... From the command line driver.
- Create a perfect drivers ecology .Appium 1.0 In fact, it has the ability of cross platform testing ,iOS、android、window、Mac、flutter There are already corresponding driver have access to , But part driver Still no one uses it . Appium 2.0 Support everyone to modify and customize based on existing drivers , Even make a completely new driver to test , One line of command can be integrated into Appium, Very convenient .
- Create a perfect plug-in system . Today's mobile terminal test scenarios are changeable and complex , Testing methods for special scenarios , You often need some plug-ins with special functions , The more typical is the location and location based on graphic recognition diff Mechanism ,Appium 2.0 Support simple and easy-to-use plug-in management system , It can easily expand its original ability , More and more developers are involved , Develop plug-ins with various functions , It will push forward very quickly Appium The development of .
install Appium 2.0 matters needing attention
It took 10 A few minutes to experiment with a simple operation process , Except for a few pits , The upgrade process is still very smooth .
First step : install node.js
Appium 2.x The version has not been officially released yet , There is no formal interface version to download , Try some fresh 2.0 New functions , Only through node install . First visit node.org Download from the official website node Environmental Science , Click on the install , Pay attention to setting environment variables during installation .

image-20211220142638123
The second step : upgrade Appium service
upgrade Appium There are two options for services , The first is global installation , This method can be operated conveniently in any directory of the system appium Instructions , But now I mainly use appium 1.x Version of , Don't want to put appium 2.0 Use as the main force , So give up this way first .
Global installation :
The second way is to install locally , Less invasive ,Appium Will be installed in the specified directory , Enter the directory to run appium Instructions , It is more suitable for the management of multiple versions . First create a local directory appium_server, Entry directory , function :
Run the local... Directly after installation appium service , Local services can directly access node_modules The directory appium Command to start , It can also be used. npx function :
After running, you will be prompted with the default port 4723 Start the service , because 2.0 The driver and plug-in have been unbound , As an independent system , So after the server starts, it will prompt No drivers and No Plugins:
Third parts : Install the test driver
Appium 2 The test drivers are managed separately , No test drivers will be installed by default , adopt appium driver The subcommand manages all drivers . There are many officially available drivers at present .

Now I only install the commonly used Android driver uiautomator2 and iOS drive xcuitest:

Step four : Start the test script
Use Python Program start a app, With Python Kuo is Appium-Python-Client, It is recommended to install the latest version . It should be noted that 2.0 The interface prefix of is no longer http://127.0.0.1:4723/wd/hub, /wd/hub It's been removed , Direct access ip: Just the port number , If you still use the previous default address , It will prompt that the route cannot be found .
summary
Appium2.0 It will be officially released soon , Taste in advance , Get familiar with the new features .
I'm nine , Thank you for your patience in reading , See you next time .
边栏推荐
- Practice operation and maintenance knowledge accumulation
- [Hangzhou][15k-20k] medical diagnosis company recruits golang development engineers without overtime! No overtime! No overtime!
- 【Day_04 0421】计算糖果
- 【无标题】
- 递归函数中 有两个递归入口的时间复杂度
- 【Day_03 0420】数组中出现次数超过一半的数字
- How to divide the disks under the devices and drives in win10 new computer
- The number of weeks of Oracle last year and this year, with the start time and end time
- Leetcode:934. The shortest Bridge
- 机械制造企业如何借助ERP系统,做好生产管理?
猜你喜欢

PG Vacuum 杂谈之 auto vacuum

多目标检测

YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors

PHP 多任务秒级定时器的实现方法

Intelligent fire protection application based on fire GIS system

“子问题的递归处理”——判断两棵树是不是相同的树——以及 另一颗树的子树

Leetcode:336. palindrome pair

移动web

Database SQL language practice

Code runner for vs code, with more than 40million downloads! Support more than 50 languages
随机推荐
Practice operation and maintenance knowledge accumulation
Latex merges multiple rows and columns of a table at the same time
Traversal of the first, middle, and last order of a binary tree -- Essence (each node is a "root" node)
MySQL multi table query introduction classic case
“子问题的递归处理”——判断两棵树是不是相同的树——以及 另一颗树的子树
[(SV & UVM) knowledge points encountered in written interview] ~ phase mechanism
【Day06_0423】C语言选择题
[day_030420] find the longest consecutive number string in the string
Leetcode:336. palindrome pair
Should we test the Dao layer?
Servlet filter details
【Day_07 0425】Fibonacci数列
Cdga | how to build data asset catalogue?
If introduced according to the open source framework
[day_040421] calculate candy
【Day_03 0420】数组中出现次数超过一半的数字
Introduction to three feasible schemes of grammatical generalization
机械制造企业如何借助ERP系统,做好生产管理?
【pytorch】CNN实战-花朵种类识别
Recursive processing - subproblem