Skip to content

Commit 0709bd5

Browse files
committed
Merge branch 'release/0.2.6'
2 parents b7fa867 + d664394 commit 0709bd5

File tree

6 files changed

+15
-13
lines changed

6 files changed

+15
-13
lines changed

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,4 +456,10 @@ tmp/
456456

457457
.vscode/
458458

459-
*.sh
459+
*.sh
460+
461+
apps
462+
463+
*.apk
464+
*.app
465+
*.zip

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.3)
4+
parallel_appium (0.2.5)
55

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

build.sh

Lines changed: 0 additions & 2 deletions
This file was deleted.

lib/parallel_appium.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,9 @@ def load_capabilities(caps)
3030
caps[:caps][:platformVersion] = device.fetch('os', caps[:caps][:platformVersion])
3131
caps[:caps][:deviceName] = device.fetch('name', caps[:caps][:deviceName])
3232
caps[:caps][:wdaLocalPort] = device.fetch('wdaPort', nil)
33+
caps[:caps][:avd] = device.fetch('avd', nil)
3334
end
3435

35-
caps[:caps][:sessionOverride] = true
36-
caps[:caps][:useNewWDA] = true
37-
# TODO: Optionally set these capabilities below
38-
caps[:caps][:noReset] = true
39-
caps[:caps][:fullReset] = false
4036
caps[:appium_lib][:server_url] = ENV['SERVER_URL']
4137
caps
4238
end

lib/parallel_appium/android.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ def start_emulators
66
emulators = `emulator -list-avds`.split("\n")
77
emulators = emulators[0, ENV['THREADS'].to_i]
88
Parallel.map(emulators, in_threads: emulators.size) do |emulator|
9-
spawn("emulator -avd #{emulator} -scale 100dpi -no-boot-anim -no-audio -accel on &", out: '/dev/null')
9+
spawn("emulator -avd #{emulator} -no-snapshot-load -scale 100dpi -no-boot-anim -no-audio -accel on &", out: '/dev/null')
1010
end
11+
12+
emulators
1113
end
1214

1315
# Get additional information for the Android device with unique identifier udid
@@ -23,9 +25,9 @@ def get_android_device_data(udid)
2325

2426
# Devices after cleanup and supplemental data included
2527
def devices
26-
start_emulators
28+
emulators = start_emulators
2729
sleep 10
28-
devices = `adb devices`.split("\n").select { |x| x.include? "\tdevice" }.map.each_with_index { |d, i| {platform: 'android', name: 'android', udid: d.split("\t")[0], wdaPort: 8100 + i, thread: i + 1} }
30+
devices = `adb devices`.split("\n").select { |x| x.include? "\tdevice" }.map.each_with_index { |d, i| {avd: emulators[i], platform: 'android', name: 'android', udid: d.split("\t")[0], wdaPort: 8100 + i, thread: i + 1} }
2931
devices = devices.map { |x| x.merge(get_android_device_data(x[:udid])) }
3032

3133
ENV['DEVICES'] = JSON.generate(devices)

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.4'.freeze
2+
VERSION = '0.2.6'.freeze
33
end

0 commit comments

Comments
 (0)