当前位置:网站首页>Appium automation test foundation - appium installation (I)
Appium automation test foundation - appium installation (I)
2022-07-01 22:49:00 【Test - Eight Precepts】
3、 ... and 、APPium install
We're going to use APPium The test framework , First you need to install APPium service ,Devices Represents the mobile phone we want to link ,Appium Client The client that wrote code for us ( That is, the test script , Download the corresponding language library according to the script language you need .)
( One )APPium server install
Mode one :
Use Node.js Mode of installation APPium server service .
1、Node.js The download
Node.js Official download address :https://nodejs.org/en/.
Enter the official website page , Click the location below to download directly , The official website will be based on your system , Directly recommend you to download Node.js edition .

LTS: Long term support , Stable version
- Current: The latest version
If you need to download other versions Node.js, You can click on the Other Downloads Download .

Enter the download page and we can see , There are more Node.js Version can be downloaded .

.msi and .zip Format difference :
.msiyes Windows installer Developed program installation file , It allows you to install , modify , Uninstall the program you installed . To put it bluntly .msi Namely Windows installer Data packets of , Encapsulate all the content related to the installation files in one package ..zipIt's a compressed package , After decompression, you can , No installation required .
2、Node.js Installation
Double click what we have downloaded Node.js Installation package node-v14.15.1-x64.msi Installation .
(1)Node.js Installation wizard interface , Click on Next.

(2) read Node.js agreement , And check to accept the terms of the license agreement .

(3) Customize Node.js Installation directory .

(4) Install custom settings
Select the installation method of the required functions .

Click the icon to change how features are installed .

explain :
Node.js runtime: install Node.js Operating environment .npm package manager: install npm Package manager , This is a Node Recommended package manager .online documentation shortcuts: Add programs to the start menu , Include links Node.js and Node.js Online documentation of the website .Add to PATH: add to Node.js and npm The installation path to the environment variable .
(5) Install the tools required to compile native modules .

The prompt will automatically install 2 A tool :
- Building tools (Python 2 and Visual Studio Building tools )
- Chocolatey
Build tools because of some npm Modules need to use C/C++ compile , If you want to compile these modules , You need to install this tool .
If you don't install this build tool , Use after npm When installing the module , Will report a mistake :
gyp ERR! find Python If you see this error , I know it's because it's not installed Building tools .
Build tools and Chocolatey It's a must , If not installed now , You can install it manually later , Relevant explanations have been given in the prompt :https://github.com/nodejs/node-gyp#on-windows
The tip also tells you Chocolatey Will pop up in the back cmd To install .
To avoid future trouble , It is strongly recommended to choose “Automatically install ...” , then Next...
Reference resources :https://www.cnblogs.com/luciolu/p/11993802.html
(6) Click on Install install Node.js.


(7) installation is complete , Click on finish.

3、Node.js Installation verification
We can go straight to CMD Anywhere in the command line window , Carry out orders node -v see Node.js edition .
the latest version Node.js At the time of installation, it also installed npm, perform npm -v see npm edition .
C:\Users\L>node -v v14.15.1 C:\Users\L>npm -v 6.14.8 explain :
test npm Is the installation successful , Thanks to the new edition of Node.js It's integrated npm, So before npm Also installed .
It can also be used cmd Command line input npm -v To test whether the installation was successful .
tips:
You can also get it from windows Enter... From the start menu of the system Node.js Command line terminal .

Tips :.msi Mode of installation Node.js After completion , Have already put node.exe Add to system environment variable path in . If you download .zip Format Node.js file , Because there is no installation process , So you need to manually node.exe Add the directory to the environment variable path in .
4、 To configure npm
To configure npm The path and cache when installing the global module cache The path of .
explain :
Because of the installation Node.js In the process , Integrated installation of npm,npm Environment variables are automatically configured , If there is a specific need , You have to reconfigure .
Therefore, when performing, for example npm install -g appium When you command global installation , The module will be installed in by default C:\Users\ user name \AppData\Roaming The next path npm and npm_cache in , This is inconvenient to manage and occupies C Disk space , As shown in the figure below :

So you need to configure npm Custom global module installation directory , stay Node.js Create two new folders under the installation directory node_global and node_cache, And then in cmd The following two commands are executed under the command :npm config set prefix "F:\DevInstall\nodejs\node_global"npm config set cache "F:\DevInstall\nodejs\node_cache"
Create two directories :

Carry out orders :
C:\Users\L>npm config set prefix "F:\DevInstall\nodejs\node_global"
C:\Users\L>npm config set cache "F:\DevInstall\nodejs\node_cache"
C:\Users\L>
After configuration , These two custom Node.js The module installation directory has taken effect .
5、Appium server install
Get into CMD Execute directly in the command line window Appium server Installation command .
Here are two kinds of downloads :
- Install the latest version Appium server:
npm install -g appium - Install a specific version of Appium server:
npm install -g [email protected]

Appium server Verify after installation
C:\Users\L>appium -v
1.19.0
C:\Users\L> start-up Appium The server
Because we downloaded non GUI Version of Appium, Therefore, the only way to start the server is through the command prompt .
We can use the default Windows Command prompt or Node.js Command prompt to start Appium.
After opening the command prompt , We just need to run the command appium, It will start Appium The server , As shown in the figure below .
( Be careful , This command is displayed at the default address and port 0.0.0.0:4723 Start the Appium.)
C:\Users\L>appium
[Appium] Welcome to Appium v1.19.0
[Appium] Appium REST http interface listener started on 0.0.0.0:4723Tips :
- If you need to run on a specific server and port Appium, You can execute the command
appium -a 127.0.0.1 -p 4723. - This command is at address
127.0.0.1Start the appium The server .
stop it Appium The server
In the command prompt window , Press Ctrl + C key .
The terminate batch job... Is displayed (Y / N) news .
C:\Users\L>appium
[Appium] Welcome to Appium v1.19.0
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[Appium] Received SIGINT - shutting down
[debug] [Appium] There are no active sessions for cleanup
[HTTP] Waiting until the server is closed
[HTTP] Received server close event
Terminate the batch operation (Y/N)?
# Input y, Then press Enter, stop it Appium service
Terminate the batch operation (Y/N)? y
C:\Users\L>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


边栏推荐
- Deep learning -- data operation
- MySQL5.7 设置密码策略(等保三级密码改造)
- Metauniverse may become a new direction of Internet development
- Awoo's favorite problem (priority queue)
- [C language] detailed explanation of malloc function [easy to understand]
- Origin2018安装教程「建议收藏」
- Arlo's thinking after confusion
- 104. SAP UI5 表格控件的支持复选(Multi-Select)以及如何用代码一次选中多个表格行项目
- The fixed assets management subsystem reports are divided into what categories and which accounts are included
- 【c语言】malloc函数详解[通俗易懂]
猜你喜欢

切面条 C语言

Explain kubernetes network model in detail

SAP ui5 application development tutorial 104 - multi select support for SAP ui5 table controls and how to use code to select multiple table row items at a time

Ffmpeg learning notes

高攀不起的希尔排序,直接插入排序

性能测试计划怎么编写

Appium automated testing foundation - Supplement: introduction to desired capabilities parameters

Yolov5.5 call local camera

Single step debugging analysis of rxjs observable of operator

死锁的处理策略—预防死锁、避免死锁、检测和解除死锁
随机推荐
QT uses ffmpeg4 to convert the qimage of ARGB to yuv422p
内部字段分隔符
Recent public ancestor offline practice (tarjan)
Mixconv code
The second anniversary of the three winged bird: the wings are getting richer and the take-off is just around the corner
Awoo's favorite problem (priority queue)
互联网的智算架构设计
447-哔哩哔哩面经1
[C language] detailed explanation of malloc function [easy to understand]
Basic knowledge of ngnix
Cloud Vulnerability Global Database
Origin2018安装教程「建议收藏」
Pytorch's code for visualizing feature maps after training its own network
Recent public ancestor (LCA) online practices
Understanding of inverted residuals
Mysql5.7 set password policy (etc. three-level password transformation)
rxjs Observable of 操作符的单步调试分析
The fixed assets management subsystem reports are divided into what categories and which accounts are included
GenICam GenTL 标准 ver1.5(4)第五章 采集引擎
Understanding of indexes in MySQL