In this post, we will discuss how to setup android & ios simulators, write and run appium java tests using Java.
Watch demo for details –
Setup android –
- Download Android studio
- Follow the steps here to download Android SDK
- Update android API levels – Android Studio | Tools | SDK manager | Android SDK | SDK Platforms . ( select the API levels to create android simulators)
- Create android simulator – Android Studio | Tools | AVD Manager
Download Android device manager to manage android simulators – Follow here
or you can use genymotion android simulator, refer here
App under test – use APIDemos.apk
To get App package and app activity – Use APKInfo.apk
Setup iOS –
- To build ios APP, Download xcode
- Download from here for UICatalog ios app code base
- Build the code, simulator launches and ios app will be installed.
Get iOS app bundle id –
osascript -e 'id of app "Full path of ios app.app"'
Appium Java code base –
Download code sample from AppiumJava_iOS_Android
Pull the code to you local drive, open the project in Eclipse and run the test.
To run the test – right click on POM.xml | Run As | Maven test