11# parallel_appium
22
3- Single and Distributed Parallel mobile testing in Appium and RSpec fro Android and iOS
3+ Single/ Distributed Parallel Cross-Platform mobile testing in Appium and RSpec for Android and iOS.
44
5- ## Quick check
5+ This project acts as a wrapper around a number of the configurations that have to be in place for
6+ running appium tests with RSpec.
67
7- If you'd like to check if you're good to go for this project simply execute
8+ The Gem:
89
9- ``` rake parallel_appium:validate_android ``` for Android
10+ * Handles single platform testing
11+ * Does cross-platform testing in Parallel
12+ * Distributes tests across multiple simulator instances for a platform
1013
11- ``` rake parallel_appium:validate_ios ``` for iOS
14+ Using the gem will speed up the time your entire test suite takes to execute and reducing your
15+ project size by packaging a lot of code that is not context-specific.
1216
17+ This project depends on [ Appium] ( http://appium.io/ ) , please ensure you've installed and configured Appium
18+ correctly before trying to work with this gem. [ Appium Doctor] ( https://github.com/appium/appium-doctor ) is a good way to
19+ ensure you're good to go here
1320
14- The messages will indicate if there's any component necessary for the platform that's still not set up as yet.
21+ ## Sample Project
22+
23+ To better demonstrate how to use the gem, a project automating Wordpress's mobile apps
24+ is presented [ here] ( https://github.com/JavonDavis/Wordpress-Open-Source-Automation-Ruby ) .
1525
26+ This project shows hands on how to integrate the gem and what it can do.
1627
1728## Installation
1829
@@ -29,10 +40,51 @@ And then execute:
2940Or install it yourself as:
3041
3142 $ gem install parallel_appium
43+
44+ ## Getting setup
45+
46+ ## Android
47+
48+ The gem uses the emulator command line tool that comes with your Android installation to manage a number of things. This
49+ however requires a bit of configuration to work properly as by default it's not added to the system path and it's usually
50+ not pointing to the correct one. Adding something like this(** in the specified order** ) in your bash_profile will resolve
51+ this
52+
53+ ```
54+ export ANDROID_HOME=/<path>/to/Android/sdk
55+ export ANDROID_AVD_HOME=~/.android/avd
56+ export PATH=$ANDROID_HOME/platform-tools:$PATH
57+ export PATH=$ANDROID_HOME/tools:$PATH
58+ export PATH=$ANDROID_HOME/tools/bin:$PATH
59+ export PATH=$ANDROID_HOME/emulator:$PATH
60+ ```
61+
62+ ## iOS
63+
64+ The main requirement here is to be running on a MAC machine, otherwise, there's nothing extra to do here
65+ all the requirements for Appium and iOS hold true.
3266
33- ## Getting started and ssage
67+ ### Additional check
3468
35- To get started with this gem there's 3 lines of code you'll need to know to include within your project.
69+ I also recommend an additional check to see if you're good to go for this project, simply execute
70+
71+ ``` bundle install --path vendor ```
72+
73+ and then
74+
75+ ``` bundle exec rake parallel_appium:validate_android ``` for Android
76+
77+ or
78+
79+ ``` bundle exec rake parallel_appium:validate_ios ``` for iOS
80+
81+
82+ The messages will indicate if there's any component necessary for the platform that's still not set up as yet.
83+
84+
85+ ## Usage
86+
87+ To get started with this gem in a project there's 3 lines of code you'll need to know to include within your project.
3688These lines handle the following.
3789
3890### Starting the servers
@@ -74,6 +126,47 @@ and the library will set this up as needed,
74126This is all you need to get started with this library. There's a number of environment variables set by the library
75127for the purpose of writing easier cross platform tests. These are described in more detail below.
76128
129+
130+ --------
131+
132+ Next you'll need to ensure the project the respective appium text files for the platform,
133+ the gem will be looking for these files in the Project root. This file is used to load the capabilities of the driver
134+ at launch.
135+
136+ Here's examples of what both could look like
137+
138+ ### appium-ios.txt
139+
140+ ```
141+ [caps]
142+ platformName = "ios"
143+ deviceName = "iPhone Simulator"
144+ platformVersion = "11.4"
145+ app = "./apps/WordPress.app.zip"
146+ automationName = "XCUITest"
147+ bundleId = "org.wordpress"
148+
149+ [appium_lib]
150+ wait = 2
151+ ```
152+
153+ ### appium-android.txt
154+
155+ ```
156+ [caps]
157+ platformName = "android"
158+ deviceName = "Android Emulator"
159+ platformVersion = "8.1.0"
160+ app = "./apps/WordPress.apk"
161+ appActivity = "org.wordpress.android.ui.WPLaunchActivity"
162+ appPackage = "org.wordpress.android"
163+
164+ [appium_lib]
165+ wait = 2
166+ ```
167+
168+ The vales are expected to change to tailor to the host machine.
169+
77170### Environment variables
78171
79172
0 commit comments