fastlane-plugin-aws_device_farm 0.1.2 → 0.1.3.pre.alpha.pre.10
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,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
ZjRlYTMxZGIwOGE5YzEwOWE3ZGZlMTk0YzlhOTU0ZTlhNjg5YThjNw==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
ZGIzMTNjMjc4OTdjN2Y0M2VlMDUxNmIxMzQ4MzQxNTZiMGUzYjI5NQ==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
YzRiNzQyZTkxNDRjZWVhNWIwZjQxYmQ1OTMxMmUwMzk5YzczZWI1MGZjMmEy
|
10
|
+
ZWVhODJjYTZmYTBjNWI0YTQ0NmZkMWE3OWFlYjVhMDc0NGM0Njg4ODU1YmYx
|
11
|
+
NWQyMTZlNmEwZGM5YmMwNDgwZWMwNTI1MDljZjQ3ZmJjZTlhODQ=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
NDBlMjQyMGMyYWI4Y2EyNGM3NjUwYTg4Yjc4MjE3Zjg0YzcwNjg1YTdhNGVj
|
14
|
+
YTZiNGU2OTg2NjQ2MGVlOGExOGUzNmI1YzJkZDQxOTM5MjAwZDUyZmY4M2Vl
|
15
|
+
YTVmNzgwZWJmMGFkYWY1ZDZmOTZmYTMzMTYxZjIxNmQzNWZkZmI=
|
data/README.md
CHANGED
@@ -6,7 +6,10 @@
|
|
6
6
|
## About
|
7
7
|
> This Plugin Allows XCUITests and android Instrumentation tests run on AWS device Farm
|
8
8
|
|
9
|
-
|
9
|
+
|
10
|
+
| iOS | Android | Fail |
|
11
|
+
|----------|-------------|-------------|
|
12
|
+
|  | |  |
|
10
13
|
|
11
14
|
|
12
15
|
|
@@ -22,86 +25,90 @@ Open your AWS dashboard and under `AWS-Device Farm` - configure your Device Pool
|
|
22
25
|
Select the devices you want to run the tests on.
|
23
26
|
|
24
27
|
|
25
|
-
### Create a project
|
28
|
+
### Create a project on AWS
|
26
29
|
in this example we called this `fastlane`
|
27
30
|
|
28
|
-
## Example
|
31
|
+
## Example iOS
|
29
32
|
|
30
33
|
```ruby
|
31
|
-
lane :
|
34
|
+
lane :aws_device_run_ios do
|
32
35
|
ENV['AWS_ACCESS_KEY_ID'] = 'xxxxx'
|
33
36
|
ENV['AWS_SECRET_ACCESS_KEY'] = 'xxxxx'
|
34
37
|
ENV['AWS_REGION'] = 'us-west-2'
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
38
|
+
|
39
|
+
#Build For Testing
|
40
|
+
xcodebuild(
|
41
|
+
scheme: 'UITests',
|
42
|
+
destination: 'generic/platform=iOS',
|
43
|
+
configuration: 'Development',
|
44
|
+
derivedDataPath: 'aws',
|
45
|
+
xcargs: "GCC_PREPROCESSOR_DEFINITIONS='AWS_UI_TEST' ENABLE_BITCODE=NO CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO build-for-testing"
|
46
|
+
)
|
47
|
+
# Transform .app into AWS compatible IPA
|
48
|
+
aws_device_farm_package(
|
49
|
+
derrived_data_path: "aws"
|
42
50
|
)
|
51
|
+
# RUN tests on AWS Device Farm
|
52
|
+
aws_device_farm
|
43
53
|
end
|
44
54
|
```
|
55
|
+
|
56
|
+
|
45
57
|
## Example Android
|
46
58
|
|
47
59
|
```ruby
|
48
|
-
lane :
|
60
|
+
lane :aws_device_run_android do
|
49
61
|
ENV['AWS_ACCESS_KEY_ID'] = 'xxxxx'
|
50
62
|
ENV['AWS_SECRET_ACCESS_KEY'] = 'xxxxx'
|
51
63
|
ENV['AWS_REGION'] = 'us-west-2'
|
52
64
|
|
65
|
+
#Build Debug App + Instrumentation Apk
|
66
|
+
gradle(task: 'assembleDebug')
|
67
|
+
gradle(task: 'assembleAndroidTest')
|
68
|
+
|
69
|
+
# RUN tests on AWS Device Farm
|
53
70
|
aws_device_farm(
|
54
|
-
|
55
|
-
|
56
|
-
test_binary_path: 'tests.apk',
|
57
|
-
device_pool: 'ANDROID',
|
58
|
-
wait_for_completion: true
|
71
|
+
binary_path: 'app/build/outputs/apk/app-debug.apk',
|
72
|
+
test_binary_path: 'app/build/outputs/apk/app-debug-androidTest-unaligned.apk'
|
59
73
|
)
|
60
74
|
end
|
61
75
|
```
|
62
76
|
|
77
|
+
## Options
|
63
78
|
|
79
|
+
* **aws_device_farm**
|
80
|
+
|
81
|
+
| Option | Default | Description | Type |
|
82
|
+
|---|---|---|---|
|
83
|
+
| name | fastlane | AWS Device Farm Project Name | String |
|
84
|
+
| binary_path | | Path to App Binary | String |
|
85
|
+
| test_binary_path | | Path to App Binary | String |
|
86
|
+
| device_pool | IOS | AWS Device Farm Device Pool | String |
|
87
|
+
| wait_for_completion | true | Wait for Test-Run to be completed | Boolean |
|
64
88
|
|
65
|
-
## To get the IPA's (app and uitest runner)
|
66
|
-
You could use something like this.
|
67
|
-
after this you have `aws/packages/app.ipa` and `aws/packages/runner.ipa`
|
68
89
|
|
69
|
-
```ruby
|
70
|
-
xcodebuild(
|
71
|
-
clean: true,
|
72
|
-
workspace: 'FiveXFive.xcworkspace',
|
73
|
-
scheme: 'UITests',
|
74
|
-
destination: 'generic/platform=iOS',
|
75
|
-
configuration: 'Development',
|
76
|
-
derivedDataPath: 'aws',
|
77
|
-
xcargs: "GCC_PREPROCESSOR_DEFINITIONS='AWS_UI_TEST' ENABLE_BITCODE=NO build-for-testing"
|
78
|
-
)
|
79
|
-
FileUtils.rm_rf '../aws/packages'
|
80
|
-
Dir['../aws/Build/Intermediates/CodeCoverage/Products/Development-iphoneos/*.app'].each do |app|
|
81
|
-
if app.include? 'Runner'
|
82
|
-
FileUtils.mkdir_p '../aws/packages/runner/Payload'
|
83
|
-
FileUtils.cp_r app, '../aws/packages/runner/Payload'
|
84
|
-
`cd ../aws/packages/runner/; zip -r ../runner.ipa .; cd -`
|
85
|
-
else
|
86
|
-
FileUtils.mkdir_p '../aws/packages/app/Payload'
|
87
|
-
FileUtils.cp_r app, '../aws/packages/app/Payload'
|
88
|
-
`cd ../aws/packages/app/; zip -r ../app.ipa .; cd -`
|
89
|
-
end
|
90
|
-
end
|
91
|
-
```
|
92
90
|
|
91
|
+
* **aws_device_farm_package**
|
93
92
|
|
94
|
-
|
93
|
+
| Option | Default | Description | Type |
|
94
|
+
|---|---|---|---|
|
95
|
+
| derrived_data_path | | Derrived Data Path, containing a `build-for-testing` derrived-data folder | String |
|
95
96
|
|
96
|
-
|
97
|
+
|
98
|
+
|
99
|
+
## Credit
|
100
|
+
it is based on a custom action by @icapps (https://github.com/icapps/fastlane-configuration)
|
101
|
+
added the following:
|
102
|
+
* iOS Support for XCUITests
|
103
|
+
* support current `fastlane` version
|
104
|
+
* improve output
|
105
|
+
* make it available as a `fastlane` plugin
|
106
|
+
|
97
107
|
|
98
108
|
## Troubleshooting
|
99
109
|
|
100
110
|
If you have trouble using plugins, check out the [Plugins Troubleshooting](https://github.com/fastlane/fastlane/blob/master/fastlane/docs/PluginsTroubleshooting.md) doc in the main `fastlane` repo.
|
101
111
|
|
102
|
-
## Using `fastlane` Plugins
|
103
|
-
|
104
|
-
For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Plugins.md).
|
105
112
|
|
106
113
|
## About `fastlane`
|
107
114
|
|
@@ -18,7 +18,7 @@ module Fastlane
|
|
18
18
|
raise "Device pool '#{params[:device_pool]}' not found. 🙈" if device_pool.nil?
|
19
19
|
|
20
20
|
# Create the upload.
|
21
|
-
path = File.
|
21
|
+
path = File.expand_path(params[:binary_path])
|
22
22
|
type = File.extname(path) == '.apk' ? 'ANDROID_APP' : 'IOS_APP'
|
23
23
|
upload = create_project_upload project, path, type
|
24
24
|
|
@@ -29,7 +29,7 @@ module Fastlane
|
|
29
29
|
# Upload the test package if needed.
|
30
30
|
test_upload = nil
|
31
31
|
if params[:test_binary_path]
|
32
|
-
test_path = File.
|
32
|
+
test_path = File.expand_path(params[:test_binary_path])
|
33
33
|
if type == "ANDROID_APP"
|
34
34
|
test_upload = create_project_upload project, test_path, 'INSTRUMENTATION_TEST_PACKAGE'
|
35
35
|
else
|
@@ -86,6 +86,7 @@ module Fastlane
|
|
86
86
|
env_name: 'FL_AWS_DEVICE_FARM_NAME',
|
87
87
|
description: 'Define the name of the device farm project',
|
88
88
|
is_string: true,
|
89
|
+
default_value: 'fastlane',
|
89
90
|
optional: false
|
90
91
|
),
|
91
92
|
FastlaneCore::ConfigItem.new(
|
@@ -95,8 +96,7 @@ module Fastlane
|
|
95
96
|
is_string: true,
|
96
97
|
optional: false,
|
97
98
|
verify_block: proc do |value|
|
98
|
-
path
|
99
|
-
raise "Application binary not found at path '#{path}'. 🙈".red unless File.exist?(path)
|
99
|
+
raise "Application binary not found at path '#{value}'. 🙈".red unless File.exist?(File.expand_path(value))
|
100
100
|
end
|
101
101
|
),
|
102
102
|
FastlaneCore::ConfigItem.new(
|
@@ -106,21 +106,25 @@ module Fastlane
|
|
106
106
|
is_string: true,
|
107
107
|
optional: true,
|
108
108
|
verify_block: proc do |value|
|
109
|
-
path
|
110
|
-
raise "Test binary not found at path '#{path}'. 🙈".red unless File.exist?(path)
|
109
|
+
raise "Test binary not found at path '#{value}'. 🙈".red unless File.exist?(File.expand_path(value))
|
111
110
|
end
|
111
|
+
|
112
112
|
),
|
113
113
|
FastlaneCore::ConfigItem.new(
|
114
114
|
key: :path,
|
115
115
|
env_name: 'FL_AWS_DEVICE_FARM_PATH',
|
116
116
|
description: 'Define the path of the application binary (apk or ipa) to upload to the device farm project',
|
117
117
|
is_string: true,
|
118
|
-
optional: false
|
118
|
+
optional: false,
|
119
|
+
verify_block: proc do |value|
|
120
|
+
raise "Application binary not found at path '#{value}'. 🙈".red unless File.exist?(File.expand_path(value))
|
121
|
+
end
|
119
122
|
),
|
120
123
|
FastlaneCore::ConfigItem.new(
|
121
124
|
key: :device_pool,
|
122
125
|
env_name: 'FL_AWS_DEVICE_FARM_POOL',
|
123
126
|
description: 'Define the device pool you want to use for running the applications',
|
127
|
+
default_value: 'IOS',
|
124
128
|
is_string: true,
|
125
129
|
optional: false
|
126
130
|
),
|
@@ -150,8 +154,6 @@ module Fastlane
|
|
150
154
|
platform == :ios || platform == :android
|
151
155
|
end
|
152
156
|
|
153
|
-
private
|
154
|
-
|
155
157
|
POLLING_INTERVAL = 10
|
156
158
|
|
157
159
|
def self.fetch_project(name)
|
@@ -0,0 +1,66 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class AwsDeviceFarmPackageAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
FileUtils.rm_rf "#{File.expand_path(params[:derrived_data_path])}/packages"
|
6
|
+
Dir["#{File.expand_path(params[:derrived_data_path])}/Build/Intermediates/CodeCoverage/Products/Development-iphoneos/*.app"].each do |app|
|
7
|
+
if app.include? 'Runner'
|
8
|
+
|
9
|
+
FileUtils.mkdir_p "#{File.expand_path(params[:derrived_data_path])}/packages/runner/Payload"
|
10
|
+
FileUtils.cp_r app, "#{File.expand_path(params[:derrived_data_path])}/packages/runner/Payload"
|
11
|
+
Actions.sh "cd #{File.expand_path(params[:derrived_data_path])}/packages/runner/; zip --recurse-paths -D --quiet #{File.expand_path(params[:derrived_data_path])}/packages/runner.ipa .;"
|
12
|
+
|
13
|
+
ENV['FL_AWS_DEVICE_FARM_TEST_PATH'] = "#{File.expand_path(params[:derrived_data_path])}/packages/runner.ipa"
|
14
|
+
else
|
15
|
+
|
16
|
+
FileUtils.mkdir_p "#{File.expand_path(params[:derrived_data_path])}/packages/app/Payload"
|
17
|
+
FileUtils.cp_r app, "#{File.expand_path(params[:derrived_data_path])}/packages/app/Payload"
|
18
|
+
Actions.sh "cd #{File.expand_path(params[:derrived_data_path])}/packages/app/; zip --recurse-paths -D --quiet #{File.expand_path(params[:derrived_data_path])}/packages/app.ipa .;"
|
19
|
+
|
20
|
+
ENV['FL_AWS_DEVICE_FARM_PATH'] = "#{File.expand_path(params[:derrived_data_path])}/packages/app.ipa"
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
#####################################################
|
27
|
+
# @!group Documentation
|
28
|
+
#####################################################
|
29
|
+
|
30
|
+
def self.description
|
31
|
+
'Packages .app from deriveddata to an aws-compatible ipa'
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.details
|
35
|
+
'Packages .app to .ipa'
|
36
|
+
end
|
37
|
+
|
38
|
+
def self.available_options
|
39
|
+
[
|
40
|
+
FastlaneCore::ConfigItem.new(
|
41
|
+
key: :derrived_data_path,
|
42
|
+
env_name: 'FL_AWS_DEVICE_FARM_DERIVED_DATA',
|
43
|
+
description: 'Derrived Data Path',
|
44
|
+
is_string: true,
|
45
|
+
optional: false
|
46
|
+
)
|
47
|
+
]
|
48
|
+
end
|
49
|
+
|
50
|
+
def self.output
|
51
|
+
[]
|
52
|
+
end
|
53
|
+
|
54
|
+
def self.return_value
|
55
|
+
end
|
56
|
+
|
57
|
+
def self.authors
|
58
|
+
["hjanuschka"]
|
59
|
+
end
|
60
|
+
|
61
|
+
def self.is_supported?(platform)
|
62
|
+
platform == :ios || platform == :android
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
metadata
CHANGED
@@ -1,111 +1,111 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-aws_device_farm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3.pre.alpha.pre.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Helmut Januschka
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ! '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ! '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: pry
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ! '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ! '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ! '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ! '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ! '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ! '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rake
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ! '>='
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ! '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rubocop
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ! '>='
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ! '>='
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: fastlane
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ! '>='
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: 1.105.0
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ! '>='
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: 1.105.0
|
111
111
|
description:
|
@@ -118,6 +118,7 @@ files:
|
|
118
118
|
- README.md
|
119
119
|
- lib/fastlane/plugin/aws_device_farm.rb
|
120
120
|
- lib/fastlane/plugin/aws_device_farm/actions/aws_device_farm_action.rb
|
121
|
+
- lib/fastlane/plugin/aws_device_farm/actions/aws_device_farm_package.rb
|
121
122
|
- lib/fastlane/plugin/aws_device_farm/helper/aws_device_farm_helper.rb
|
122
123
|
- lib/fastlane/plugin/aws_device_farm/version.rb
|
123
124
|
homepage: https://github.com/hjanuschka/fastlane-plugin-aws_device_farm
|
@@ -130,17 +131,17 @@ require_paths:
|
|
130
131
|
- lib
|
131
132
|
required_ruby_version: !ruby/object:Gem::Requirement
|
132
133
|
requirements:
|
133
|
-
- -
|
134
|
+
- - ! '>='
|
134
135
|
- !ruby/object:Gem::Version
|
135
136
|
version: '0'
|
136
137
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
137
138
|
requirements:
|
138
|
-
- -
|
139
|
+
- - ! '>'
|
139
140
|
- !ruby/object:Gem::Version
|
140
|
-
version:
|
141
|
+
version: 1.3.1
|
141
142
|
requirements: []
|
142
143
|
rubyforge_project:
|
143
|
-
rubygems_version: 2.4.
|
144
|
+
rubygems_version: 2.4.5
|
144
145
|
signing_key:
|
145
146
|
specification_version: 4
|
146
147
|
summary: Run UI Tests on AWS Devicefarm
|