You can install Appium by two ways,
CLI-based Appium Server
GUI-based Appium Server
Installing CLI-based Appium Server:
Appium provides a vibrant GUI application that helps you manage all automation process very easy. But when you connect your tests with CI/CD pipeline, you require to start your server via scripts. In that case we need of CLI-based servers.
Step 1: Install Node.js
As Appium is written in Node.js, we first need to install Node.js in our machine to install npm.
You can download Node.js from its official website.
Once download is complete, you can install the package by accepting the terms and proceeding to next screen.
Set the default path and click finish to complete installation.
After the installation, check whether the environmental variable (Right-click on Start->System->Advanced->Environment Variables) contains the path of npm and nodejs. The system path shows the Node.js path and the user variable shows the npm path..
Step 2: Install Appium from command promt
To install Appium, open your Node.js command prompt, and enter the following command.
npm install -g Appium
After installation, you can start using Appium.
Installing GUI Based Appium Server:
You can download appium desktop from its official website.
Once you have installed appium desktop, the opening screen will have options to enter your host and port details to start your server.
The default Port is 4723. You can modify the default values by clicking on Edit Configurations.
Appium drivers are nothing but the mobile device or the simulators where you are going to test your application. This setup differs based on the device you are going to use.
You can use the following driver setups based the platform and desired capabilities of your device.
The XCUITest Driver (for iOS and tvOS apps)
The Espresso Driver (for Android apps)
The UiAutomator2 Driver (for Android apps)
The Windows Driver (for Windows Desktop apps)
The Mac Driver (for Mac Desktop apps)
To set up Appium drivers, you require the app development setup of that particular platform. For example, if you want to use Android drivers, you should have Android SDK setup.
Android studio is an open source tool to develop apps on any kind of android devices. You can download Android studio from its official website.
When all is said and done, Appium is just an HTTP server. It sits and waits for connections from a client, which then instructs Appium what kind of session to start and what kind of automation behaviors to enact once a session is started.
Luckily, Appium speaks the same protocol as Selenium, called the WebDriver Protocol. You can do a lot of things with Appium just by using one of the standard Selenium clients.
Appium client is nothing but the IDE and other jar files that helps you to write your test scripts and execute them in your local machine. Here we are going to write our scripts in Java with the help of Eclipse IDE.
As part of Appium client, you need to have
An IDE (Android Studio)
Selenium and TestNg jars
JDK setup in your machine.
You can check how to set up eclipse, Maven and add maven dependencies for Selenium and testng here.
Once all this softwares are installed, we are good to go!!