fastlane-plugin-testdroid_runner 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7dc2339e03eef16f71d6ff6b42eb80dfe58aad0651754d8dffef9b0b400d67d1
|
4
|
+
data.tar.gz: f2b38cd9e0730d863d40d05e1f919a3d61b39a641df3bae1b75bee347fff101c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c5cef3b920347b676b6c0ebcebb2a4ee11200a86e3580883e65ea1e088bfc910025546b46a0d2d9adc9675c21440564e832828a11564bed104d77d864e26dd9
|
7
|
+
data.tar.gz: 4629f25cc9962eb0d76455cd10b544cba6b2ad306ff8b888d06961c87d3b35b174a9aa3fcafcbfc890754713f1d3f1e0be0541ca1f83048634ca3c0e28d3d666
|
@@ -70,6 +70,12 @@ module Fastlane
|
|
70
70
|
optional: true,
|
71
71
|
type: Integer,
|
72
72
|
default_value: 2),
|
73
|
+
FastlaneCore::ConfigItem.new(key: :timeout,
|
74
|
+
env_name: "TESTDROID_RUNNER_TIMEOUT",
|
75
|
+
description: "Timeout for running the tests in seconds. Testdroid has a default of 30m, we set 60m as default.",
|
76
|
+
optional: true,
|
77
|
+
type: Integer,
|
78
|
+
default_value: 3600),
|
73
79
|
FastlaneCore::ConfigItem.new(key: :scheduler,
|
74
80
|
env_name: "TESTDROID_RUNNER_SCHEDULER",
|
75
81
|
description: "Which type of scheduler to use, by default it will only run one device at a time",
|
@@ -13,9 +13,8 @@ module Fastlane
|
|
13
13
|
|
14
14
|
# get all the devices to run on
|
15
15
|
device_group = user.device_groups.list.detect { |group| group.display_name.casecmp(params[:device_group]) == 0 }
|
16
|
-
run_devices = device_group.devices.
|
16
|
+
run_devices = device_group.devices.list_all.select { |device| device.os_type.casecmp(os_config[:name]) == 0 }
|
17
17
|
puts("[testdroid] Running on devices #{run_devices.collect(&:display_name)}")
|
18
|
-
|
19
18
|
# get IDs of the devices
|
20
19
|
id_list = run_devices.collect(&:id)
|
21
20
|
|
@@ -35,7 +34,7 @@ module Fastlane
|
|
35
34
|
i += params[:concurrency] * 2
|
36
35
|
# start test run
|
37
36
|
test_run = user.runs.create("{\"osType\": \"#{os_config[:name]}\", \"projectId\": #{project.id}, \"frameworkId\":#{framework_id},
|
38
|
-
\"deviceIds\": #{list}, \"scheduler\": \"#{params[:scheduler] || 'SERIAL'}\", \"files\": [{\"id\": #{file_app.id}, \"action\": \"INSTALL\" },
|
37
|
+
\"deviceIds\": #{list}, \"scheduler\": \"#{params[:scheduler] || 'SERIAL'}\", \"timeout\": \"#{params[:timeout]}\", \"files\": [{\"id\": #{file_app.id}, \"action\": \"INSTALL\" },
|
39
38
|
{\"id\": #{file_test.id}, \"action\": \"RUN_TEST\" }]}")
|
40
39
|
puts("[testdroid] Started test run, access it using this link: https://cloud.bitbar.com/#testing/projects/#{project.id}/#{test_run.id}")
|
41
40
|
|
@@ -53,8 +52,16 @@ module Fastlane
|
|
53
52
|
|
54
53
|
next unless params[:report_dir]
|
55
54
|
puts("[testdroid] Downloading files...")
|
56
|
-
|
57
|
-
|
55
|
+
test_run.device_sessions.list_all().each { |tr|
|
56
|
+
begin
|
57
|
+
downloaded_file = "#{params[:report_dir]}/#{tr.id()}.zip"
|
58
|
+
user.instance_variable_get(:@client)
|
59
|
+
.download("/cloud/api/v2/me/device-sessions/#{tr.id()}/output-file-set/files.zip", downloaded_file)
|
60
|
+
puts("[testdroid] Downloaded file for #{tr.device["displayName"]} (device session #{tr.id()}) as #{downloaded_file}")
|
61
|
+
rescue
|
62
|
+
puts("[testdroid] No files available for #{tr.device["displayName"]} (device session #{tr.id()})")
|
63
|
+
end
|
64
|
+
}
|
58
65
|
puts("[testdroid] All files downloaded")
|
59
66
|
end
|
60
67
|
ensure
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-testdroid_runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- josepmc
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: testdroid-api-client-updated
|