当前位置:网站首页>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 .
边栏推荐
- [day_040421] calculate candy
- [day_050422] continuous maximum sum
- Amd zen4 game God u reached 208mb cache within this year, which is unprecedented
- Webapi collation
- [day_070425] Fibonacci series
- Read five articles in the evening | Economic Daily: don't treat digital collections as wealth making products
- Matlab 向量与矩阵
- Nuxt configuration topic switching
- [day06_0423] C language multiple choice questions
- 递归函数中 有两个递归入口的时间复杂度
猜你喜欢

【无标题】

VS中使用动态库

The time complexity of two recursive entries in a recursive function

Recursive processing - subproblem

Docking wechat payment (II) unified order API

白盒测试的概念、目的是什么?及主要方法有哪些?
![[(SV & UVM) knowledge points encountered in written interview] ~ phase mechanism](/img/19/32206eb6490c2a5a7a8e746b5003c1.png)
[(SV & UVM) knowledge points encountered in written interview] ~ phase mechanism

Redis sentinel cluster setup

How to divide the disks under the devices and drives in win10 new computer

数据库sql语言实战
随机推荐
Intelligent fire protection application based on fire GIS system
[day06_0423] C language multiple choice questions
Convolutional neural network (III) - target detection
【Day03_0420】C语言选择题
Leetcode:940. How many subsequences have different literal values
Convolutional neural network (IV) - special applications: face recognition and neural style transformation
Leetcode 42. rainwater connection
nuxt 配置主题切换
【Day_04 0421】计算糖果
分布式 | 实战:将业务从 MyCAT 平滑迁移到 dble
K. Link with Bracket Sequence I dp
Recursive processing - subproblem
Swift basic FileManager (file management)
Understanding the mathematical essence of machine learning
YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors
Embedded sharing collection 15
将金额数字转换为大写
flex布局
Practice operation and maintenance knowledge accumulation
Leetcode:934. The shortest Bridge