当前位置:网站首页>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 .
边栏推荐
- 逆序打印链表
- 将金额数字转换为大写
- Amd zen4 game God u reached 208mb cache within this year, which is unprecedented
- Calling mode and execution sequence of JS
- [day_030420] numbers that appear more than half of the time in the array
- 分布式 | 实战:将业务从 MyCAT 平滑迁移到 dble
- 实习运维知识积累
- Jz36 binary search tree and bidirectional linked list
- Embedded sharing collection 15
- TPS Motion(CVPR2022)视频生成论文解读
猜你喜欢

Widget is everything, widget introduction

Mysql45 talks about transaction isolation: why can't I see it after you change it?

【无标题】

Flex layout

Workflow activiti5.13 learning notes (I)

Leetcode:934. The shortest Bridge

Implementation of PHP multitask second timer

Oc/swift Technology Download File (breakpoint continuation AFN download file alamofire Download File native download) (source code)

Registration conditions for system integration project management engineer (intermediate level of soft exam) in the second half of 2022

【Day05_0422】C语言选择题
随机推荐
Mysql45 talking about infrastructure: how is an SQL query executed?
[free and easy to use] holiday query interface
Docking wechat payment (II) unified order API
If I want to listen to Jay Chou with you, I want you to listen to my whole youth
PHP 多任务秒级定时器的实现方法
【pytorch】微调技术
Database SQL language practice
Webapi collation
BPG笔记(四)
VS中使用动态库
Easycvr video square channel display and video access full screen display style problem repair
Practice operation and maintenance knowledge accumulation
Leetcode 42. rainwater connection
【pytorch】图片增广
YOLOv6:又快又准的目标检测框架开源啦
Interpretation of TPS motion (cvpr2022) video generation paper
Should we test the Dao layer?
Meiker Studio - Huawei 14 day Hongmeng equipment development practical notes 4
Widget is everything, widget introduction
Acquisition of bidding information