Challenge Overview
Environment Setup
This is the 250 points Easy level problem of Topcoder Skill Builder Challenge: Appium.
For more context info, Register for the Host Competition before submitting a solution to this problem.
Solving this problem you learn:
-
Install Appium
-
Install Android Studio and Set Environment Variables.
-
Learn how to set the Desired Capability and Open the given App.
Learning Resources:
Appium Documentation: http://appium.io/docs/en/about-appium/intro/
Appium Desired Capabilities: http://appium.io/docs/en/writing-running-appium/caps/
Appium Setup Windows/macOS and to connect Android Device: Go here Resources
If you have any questions, doubts or any other learning resource you find please post it in the forums.
What do you need to do?
The requirement for this challenge is simple:
-
Install the Appium Server on your machine (detailed steps are provided below)
-
Set Desired Capabilities and Open the Calculator App (on your mobile) using Appium.
-
You don’t need to write a single line of code.
1. Install Appium Desktop Server
-
Download Appium Desktop and Install it on your machine.
-
Open Appium and Start the Server. You should see a similar screen as shared below.
2. For Android
2.1 Connect Device to Appium Server For Android
-
Connect your Android Device to the Desktop and Make sure Developer Options and USB-Debugging is enabled on your Android Device.
-
Download and Install Android Studio
-
Set environment variables. Use this link for reference.
-
ANDROID_HOME: Location of the SDK Folder
-
Path: Append path of platform_tools folder
-
-
Go to Terminal and run `adb devices` to extract Device ID with which you want to connect your device with Appium Server. For more details please go here
2.2 Set Desired Capability and Open App.
-
Now we are about to open an app (let’s say Calculator) which was installed in your Android Phone. For that, open a new session on the Appium Tool as shown below
-
Now add the Desired Capability, below is a sample desired capability to open the Calculator App:
-
Make sure to update your own Device ID
{
"deviceName": "12455555555555",
"autoAcceptAlerts": "true",
"udid": "12455555555555",
"appPackage": "com.google.android.calculator",
"automationName": "UiAutomator1",
"platformName": "Android",
"appActivity": "com.android.calculator2.Calculator"
}
-
To extract appPackage and platformName, please use this app.
-
Save it and start a new session. If everything is ok, you will get below screen.
3. For IOS.
3. 1. For IOS you need to have the latest version of XCode and a few other steps are required to set things up. Take a look at this video and then follow the steps below to get set and ready to test on IOS Devices.
-
Connect your iOS Device with your machine or Open iPhone simulator from XCode
-
Set the desired capability based on your phone/simulator. Here is a sample desired capability:
{
"platformName": "iOS",
"platformVersion": "13.3",
"deviceName": "iPhone 8",
"automationName": "XCUITest",
"app": "/Users/Device/Desktop/appium/TestApp.app"
}
You can download the test application from here.
-
Then start the session, once you connect, you will see the below screen.
Instructions
-
We have prepared three problems: Easy, Medium, and Hard, which are worth 250, 500, 1000 points respectively. Points are based on the difficulty of the problem.
-
The competitions may or may not be related to each other.
-
The links to the problems/competitions are provided below.
Problems
-
Easy: 250 Points:: Environment Setup
-
Medium: 500 Points:: Your First Automation Script
-
Hard: 1000 Points:: Write Test Scripts for Slack App