Skip to content

Commit b7fa867

Browse files
committed
Merge branch 'release/0.2.4'
2 parents 4992408 + 564e2a1 commit b7fa867

File tree

4 files changed

+105
-12
lines changed

4 files changed

+105
-12
lines changed

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
parallel_appium (0.2.2)
4+
parallel_appium (0.2.3)
55

66
GEM
77
remote: https://rubygems.org/

README.md

Lines changed: 101 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,29 @@
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:
2940
Or 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.
3688
These lines handle the following.
3789

3890
### Starting the servers
@@ -74,6 +126,47 @@ and the library will set this up as needed,
74126
This is all you need to get started with this library. There's a number of environment variables set by the library
75127
for 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

lib/parallel_appium/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module ParallelAppium
2-
VERSION = '0.2.3'.freeze
2+
VERSION = '0.2.4'.freeze
33
end

parallel_appium.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ lib = File.expand_path('lib', __dir__)
33
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
44
require 'parallel_appium/version'
55

6-
summary = 'Start multi-threaded appium servers'
6+
summary = 'Multi-threaded mobile testing with Appium, Selenium and Rspec'
77
description = 'Through the creation of multiple environments
88
this library allows for the distribution of multiple tests across 1 or more
99
devices or simulators. The library uses Selenium Grid and Appium to launch a
10-
specified number of web driver and appium instances to spread the test load
10+
specified number of web driver and appium instances to distribute the RSpec test load
1111
across available devices'
1212

1313
Gem::Specification.new do |spec|

0 commit comments

Comments
 (0)