Install Guide Mac Mobile Automate
Install Guide Mac Mobile Automate
Install Guide Mac Mobile Automate
Introduction
This documentation provides an overview of various tools and software utilized for mobile app
automation on the Macbook Pro platform. These tools enable testers to automate the testing of
mobile applications across different platforms and devices.
To perform mobile app automation on a MacBook Pro, you typically need the following
prerequisites:
1. MacBook Pro: Any recent MacBook Pro model should work fine.
2. Operating System: Ensure you have macOS installed. Most automation tools support
recent versions of macOS.
Purpose: Used for installing and managing dependencies and tools required for mobile app
automation.
Installation Steps: The step-by-step instructions to install Homebrew on your MacBook Pro:
1. Open Terminal: You can find Terminal in the "Utilities" folder within the
"Applications" folder, or you can use Spotlight Search (Cmd + Space) and type
"Terminal" to open it.
2. Install Command Line Tools for Xcode: If you haven't already installed Xcode
Command Line Tools, you might need to do so. In Terminal, type the following
command and press Enter: xcode-select –install.
3. Install Homebrew: Once you have Terminal open, you can install Homebrew by
copying and pasting the following command into Terminal and pressing Enter: /bin/bash -
c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh) ".
(This command will download and execute the Homebrew installation script.)
4. Follow the Prompts: After running the installation command, you'll be prompted to
enter your password. This is required for the installation to proceed. When you type your
password, no characters will appear on the screen, but Terminal is still registering your
input. Press Enter after typing your password.
5. Wait for Installation: The installation process may take a few minutes depending on
your internet connection speed. Homebrew will automatically download and install the
necessary files.
6. Verify Installation: After the installation is complete, you can verify that Homebrew
was installed correctly by running: brew –version.
(This command will display the version of Homebrew installed on your system. If Homebrew
was installed successfully, you'll see the version number in the output.)
2. Node.js
Description: Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine.
Purpose: Utilized for running JavaScript-based automation scripts and setting up the
environment for tools like Appium.
1. Update Homebrew: It's always a good idea to update Homebrew to the latest version before
installing any new packages. Run: brew update.
2. Install Node.js: Once Homebrew is installed and updated, you can install Node.js by running:
brew install node.
3. Verify Installation: After the installation is complete, you can verify that Node.js and npm
(Node Package Manager) were installed correctly by checking their versions. Run the following
commands: node –v
npm –v.
This will display the installed versions of Node.js and npm, respectively.
3. Appium
Description: Appium is an open-source tool for automating mobile, native, and hybrid
applications on iOS and Android platforms.
Purpose: Used for writing and executing automated tests for mobile applications across different
devices and operating systems.
Once you have Node.js installed, you can install Appium using npm (Node Package
Manager). Run the following command:
After installation, you can verify that Appium is installed correctly by running:
appium –version
To start the Appium server, simply run the following command in Terminal:
Appium
This will start the Appium server, and you'll see the logs indicating that the server is running.
Appium Desktop provides a graphical interface for working with Appium. You can install it via
Homebrew Cask by running:
brew install --cask appium-desktop
4. Java 8
Description: Java 8 is a programming language and computing platform widely used for
developing automation framework for mobile applications.
Purpose: Required for writing automation scripts using Java and running test suites using
frameworks like TestNG.
Installation Steps: Before installing Java 8, you may want to check if it's already installed on your
system. Open Terminal and run:
java –version
Download Java 8 from the official Oracle website or from other trusted sources. Here's a
direct link to the Oracle JDK 8 download page: Java SE Development Kit 8 Downloads
Once the download is complete, double-click on the downloaded .dmg file to mount the disk
image.
Inside the mounted disk image, you'll find a .pkg file. Double-click on it to start the
installation process.
Follow the on-screen instructions to complete the installation. You may need to enter your
administrator password during the process.
After the installation is complete, you can verify that Java 8 is installed correctly by
reopening Terminal and running:
java –version
This command should now display the version information for Java 8.
Set JAVA_HOME Setting the JAVA_HOME environment variable can be useful for some
applications. To set JAVA_HOME to Java 8, you can add the following line to your shell
profile (.bash_profile, .bashrc, .zshrc, etc.):
Save the file, and then run source ~/.bash_profile (or source ~/.bashrc, source
~/.zshrc, etc.) to apply the changes immediately.
5. Eclipse IDE
Description: Eclipse IDE is a popular integrated development environment for Java
development.
Installation Steps:
Drag the extracted Eclipse folder to your Applications folder. This will install Eclipse on your
system.
Open Finder and navigate to your Applications folder. Double-click on the Eclipse icon to
launch the Eclipse IDE.
When you first launch Eclipse, you'll be prompted to select a workspace. This is the directory
where your projects and preferences will be stored. You can choose the default workspace or
specify a custom location.
Once Eclipse is up and running, you can verify that it's installed correctly by creating a new Java
project or opening an existing one.
6. Selenium
Description: Selenium is a suite of tools for automating web browsers.
Purpose: Integrated with Appium, it enables the automation of mobile web applications using
web browser automation techniques.
Installation Steps:
Selenium WebDriver is a set of APIs that allows you to automate web browsers across different
platforms. You can add Selenium WebDriver as a dependency in your Java project using a build
automation tool like Maven or Gradle.
You're now ready to run your Selenium tests. Execute your Java program from Eclipse or using
Terminal.
7. TestNG
Description: TestNG is a testing framework inspired by JUnit and NUnit.
Purpose: Used for organizing and running automated tests written in Java. Integrates seamlessly
with Eclipse IDE for test management.
Installation Steps:
If you've created a Maven project, open the pom.xml file located in the root directory of your
project.
Add the TestNG dependency inside the <dependencies> tag:
If you've created a Maven project, you need to update it to download the TestNG dependency.
TestNG PLUGINS :
Install TestNG Plugin:
In Eclipse, create a new Java project by selecting File > New > Java Project.
Give your project a name and click "Finish".
Eclipse provides a TestNG Results view where you can see the status of your test cases
(passed, failed, skipped) and any associated logs or stack traces.
You can open this view by going to Window > Show View > Other > TestNG >
TestNG.
8. Appium Inspector
Description: Appium Inspector is a tool provided by Appium for inspecting elements of mobile
applications.
Installation Steps:
Download the Appium Desktop application from its GitHub releases page: Appium Desktop
Releases.
Once downloaded, you can simply drag the Appium Desktop app into your Applications folder.
Navigate to your Applications folder and double-click on the Appium Desktop app to launch it.
Once Appium Desktop is open, you'll see the option to start a new server session.
Configure your desired capabilities for the session (like platformName, deviceName, etc.).
Click on the "Start Session" button.
This will launch the Appium Inspector, where you can interactively inspect elements of your
mobile application.
9. BrowserStack AppLive
Description: BrowserStack AppLive is a real device cloud platform for mobile app testing.
Purpose: Allows testing mobile applications on a wide range of real devices, browsers, and
operating systems.
Installation Steps:
Log in to BrowserStack
Once you have signed up, log in to your BrowserStack account using your credentials.
In the BrowserStack dashboard, navigate to the "AppLive" section. This section allows you to
test your mobile apps in real-time on real devices.
To test your app, you need to upload it to BrowserStack. You can do this by clicking on the
"Upload App" button in the AppLive section.
Follow the instructions to upload your app file. BrowserStack supports various formats, including
.apk for Android and .ipa for iOS.
Choose a Device
Once your app is uploaded, BrowserStack will present you with a list of real devices that you can
test your app on.
Choose a device from the list that you want to test your app on. You can filter devices by OS
version, manufacturer, and more.
Start Testing
BrowserStack provides various testing tools to help you debug and test your app effectively.
These include debug logs, device logs, network logs, and more.
Explore the testing tools available to you to identify and fix any issues with your app.
Once you've finished testing your app, you can end the testing session by closing the device
window.
Your testing session will be saved in your BrowserStack account, allowing you to review it later if
needed.
Purpose: Used for developing, debugging, and testing mobile applications natively on Android
and iOS platforms.
Once the download is complete, locate the downloaded file (usually in your Downloads
folder) and double-click to open it.
Drag the Android Studio icon into the Applications folder to install it.
After installing the SDK components, it's a good idea to configure the SDK path in Android
Studio.
Go to "Preferences" (Android Studio > Preferences) or press Command + , to open the
Preferences window.
In the left sidebar, navigate to "Appearance & Behavior" > "System Settings" > "Android
SDK".
Here, you can specify the Android SDK location. If you installed the SDK using the SDK
Manager, the default path should be something like /Users/<your-
username>/Library/Android/sdk.
If you plan to develop and test Android applications, you may want to set up virtual devices
(emulators) for testing.
In Android Studio, go to "Tools" > "AVD Manager" to open the Android Virtual Device
Manager.
Click on the "Create Virtual Device" button to create a new virtual device.
Follow the wizard to select a device definition, system image, and configure other settings as
needed.
Once the virtual device is created, you can launch it from the AVD Manager for testing your
applications.
You can check for updates by going to "Android Studio" > "Check for Updates" on macOS.
Installing Xcode on a Mac is essential for iOS and macOS development. Here's a step-by-step
guide:
Click on the Apple menu () in the top-left corner of your screen.
Select "App Store" from the dropdown menu.
In the search bar at the top-right corner of the App Store, type "Xcode" and press Enter.
Xcode should appear as the first result. Click on it to open the Xcode page.
Install Xcode
On the Xcode page, you should see an "Install" button. Click on it.
You might be prompted to enter your Apple ID credentials. Enter your credentials and click "Sign
In" if required.
After signing in, the installation process will start automatically.
Depending on your internet connection speed, it may take some time to download and install
Xcode.
Once the installation is complete, launch Xcode from your Applications folder.
You'll be prompted to agree to the Xcode license agreement. Read the agreement and click
"Agree" if you agree to the terms.
After agreeing to the license agreement, Xcode might prompt you to install additional
components such as command line tools. Follow the on-screen instructions to install these
components if necessary.
Configure Xcode
Upon first launch, Xcode may ask you to sign in with your Apple ID. Signing in is optional, but it
allows you to access additional features such as submitting apps to the App Store.
You may also want to customize Xcode preferences according to your preferences. You can
access preferences by clicking on "Xcode" in the menu bar and selecting "Preferences".
Xcode receives updates regularly with new features, bug fixes, and performance improvements.
It's a good idea to keep Xcode up to date.
You can check for updates by opening the App Store, clicking on your profile icon in the bottom-
left corner, and selecting "Updates".
Installation Steps:
1. Download Chrome:
o Open your existing web browser (e.g., Safari) and go to the Google Chrome website.
o Click on the "Download Chrome" button.
2. Install Chrome:
o Once the download is complete, locate the downloaded file (usually in your Downloads
folder) and double-click on it to open.
o Drag the Google Chrome icon into the Applications folder to install it.
3. Open Chrome:
o Go to your Applications folder and double-click on Google Chrome to launch it.
o You can also drag Chrome to your Dock for easy access.
1. Download Firefox:
o Open your existing web browser and go to the Mozilla Firefox website.
o Click on the "Download Firefox" button.
2. Install Firefox:
o Once the download is complete, locate the downloaded file and double-click on it to
open.
o Drag the Firefox icon into the Applications folder to install it.
3. Open Firefox:
o Go to your Applications folder and double-click on Mozilla Firefox to launch it.
o You can also drag Firefox to your Dock for easy access.
Additional Tips:
Browser Updates:
o Both Chrome and Firefox receive regular updates. It's a good practice to keep your
browsers up to date to ensure security and performance improvements. Updates for
Chrome can be found in the Chrome menu (Chrome > About Google Chrome), and for
Firefox, in the Firefox menu (Firefox > About Firefox).
Conclusion
Mobile app automation tools and software play a crucial role in streamlining the testing process
for mobile applications. By leveraging these tools, developers and testers can ensure the quality
and reliability of their mobile apps across different platforms and devices. The combination of
Homebrew, Node.js, Appium, Java 17, Eclipse IDE, Selenium, TestNG, Appium Inspector,
BrowserStack AppLive, Android Studio, Xcode, Chrome Browser, and Firefox Browser forms a
comprehensive toolchain for efficient mobile app automation on the macOS platform.