fastlane-plugin-aws_device_farm 0.1.1 → 0.1.2.pre.alpha.pre.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 9dea952eeee883b110ff3180249577b133c116f2
4
- data.tar.gz: 1944feafc674bde86dfe5e03efd4ef2c05c82c71
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ OWU2NjgwOTYzYjYwNWFjNjVlZjVlYTY2MDg0ZDk2ODcwNDMzMWJhYw==
5
+ data.tar.gz: !binary |-
6
+ MWZhNWE5OThiZWJiYjJiNTI0ZTk3NDRkYmZiZmRmMzI4NmE4YjRlNg==
5
7
  SHA512:
6
- metadata.gz: d059154ce12b917f3b555e9a1b4c024780250b390e73dd409f9ffb28c82de562e0b0572d32815ab06e597f0e142d310647e5b2e07ac889fd3241ff8abe412569
7
- data.tar.gz: 5f0939aa55f97afa73b22b26c49218caaf81aceb4b6e6bfb8fe65e3e27e5e1b7cd32964d1b35750e0de19f51cb26c99ebccd706dd4e5544691b286b69f7c34bd
8
+ metadata.gz: !binary |-
9
+ OWQ0NmZmMWUyMjNiMDM3MDA3NDUwOWNhMjRhOWY3NzIzNzQ4MzA4ZmJkNDVl
10
+ MTExYzdjZDhjMDI5N2NjNzJiOGQ2M2MwM2JiODk5OGQxOWJmZDVhMzg4MTMz
11
+ ZmY3MGFmNzA2YmU0ODAzZjU5YWI2YmM4Y2I3NWM4YjdhZTg0YTM=
12
+ data.tar.gz: !binary |-
13
+ MzZkZmFmZDk2MWQxYTk4ZDcwODlkMmIzMzk0OWM0MDUyOTFjYjM0NzVjZjAz
14
+ YzFmYmMxZTU2NTc3ZGJiODYzODE5OWRjOGJkZjk5MzMwYTFiNGUwZWRiYThj
15
+ MDIyNDE0ZWJmMjViYWMyMjlmNzJmNGJjNWNmNDliYmFjNzA1ZWY=
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2016 Helmut Januschka <h.januschka@krone.at>
3
+ Copyright (c) 2016 Helmut Januschka <helmut@januschka.com>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,40 +1,117 @@
1
- # aws_device_farm plugin
1
+ # AWS Device Farm Plugin for Fastlane
2
2
 
3
- [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-aws_device_farm)
3
+ [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-sharethemeal)
4
4
 
5
- ## Getting Started
6
5
 
7
- This project is a [fastlane](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-aws_device_farm`, add it to your project by running:
6
+ ## About
7
+ > This Plugin Allows XCUITests and android Instrumentation tests run on AWS device Farm
8
8
 
9
- ```bash
9
+
10
+ | IOS | Android | Fail |
11
+ |----------|-------------|-------------|
12
+ | ![Screenshot](assets/screen_done.png) | ![Screenshot](assets/screen_don_android.png)| ![Screenshot](assets/fail.png) |
13
+
14
+
15
+
16
+
17
+ ## Setup
18
+ ### Add Plugin
19
+ ```
10
20
  fastlane add_plugin aws_device_farm
11
21
  ```
12
22
 
13
- ## About aws_device_farm
23
+ ### Create Device Pools
24
+ Open your AWS dashboard and under `AWS-Device Farm` - configure your Device Pools.
25
+ Select the devices you want to run the tests on.
14
26
 
15
- Run UI Tests on AWS Devicefarm
16
27
 
17
- **Note to author:** Add a more detailed description about this plugin here. If your plugin contains multiple actions, make sure to mention them here.
28
+ ### Create a project on AWS
29
+ in this example we called this `fastlane`
18
30
 
19
- ## Example
31
+ ## Example IOS
20
32
 
21
- Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
33
+ ```ruby
34
+ lane :aws_device_run_ios do
35
+ ENV['AWS_ACCESS_KEY_ID'] = 'xxxxx'
36
+ ENV['AWS_SECRET_ACCESS_KEY'] = 'xxxxx'
37
+ ENV['AWS_REGION'] = 'us-west-2'
22
38
 
23
- **Note to author:** Please set up a sample project to make it easy for users to explore what your plugin does. Provide everything that is necessary to try out the plugin in this project (including a sample Xcode/Android project if necessary)
39
+ aws_device_farm(
40
+ name: 'fastlane',
41
+ binary_path: 'aws/packages/app.ipa',
42
+ test_binary_path: 'aws/packages/runner.ipa',
43
+ device_pool: 'IOS',
44
+ wait_for_completion: true
45
+ )
46
+ end
47
+ ```
24
48
 
25
- ## Run tests for this plugin
26
49
 
27
- To run both the tests, and code style validation, run
50
+ ## Example Android
28
51
 
52
+ ```ruby
53
+ lane :aws_device_run_android do
54
+ ENV['AWS_ACCESS_KEY_ID'] = 'xxxxx'
55
+ ENV['AWS_SECRET_ACCESS_KEY'] = 'xxxxx'
56
+ ENV['AWS_REGION'] = 'us-west-2'
57
+
58
+ aws_device_farm(
59
+ name: 'fastlane',
60
+ binary_path: 'app/build/outputs/apk/app-debug.apk',
61
+ test_binary_path: 'app/build/outputs/apk/app-debug-androidTest-unaligned.apk',
62
+ device_pool: 'ANDROID',
63
+ wait_for_completion: true
64
+ )
65
+ end
29
66
  ```
30
- rake
31
- ```
32
67
 
33
- To automatically fix many of the styling issues, use
68
+
69
+ ## IOS Build IPA's
70
+ You could use something like this.
71
+ after this you have `aws/packages/app.ipa` and `aws/packages/runner.ipa`
72
+
73
+ ```ruby
74
+ xcodebuild(
75
+ clean: true,
76
+ workspace: 'FiveXFive.xcworkspace',
77
+ scheme: 'UITests',
78
+ destination: 'generic/platform=iOS',
79
+ configuration: 'Development',
80
+ derivedDataPath: 'aws',
81
+ xcargs: "GCC_PREPROCESSOR_DEFINITIONS='AWS_UI_TEST' ENABLE_BITCODE=NO CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO build-for-testing"
82
+ )
83
+ FileUtils.rm_rf '../aws/packages'
84
+ Dir['../aws/Build/Intermediates/CodeCoverage/Products/Development-iphoneos/*.app'].each do |app|
85
+ if app.include? 'Runner'
86
+ FileUtils.mkdir_p '../aws/packages/runner/Payload'
87
+ FileUtils.cp_r app, '../aws/packages/runner/Payload'
88
+ `cd ../aws/packages/runner/; zip -r ../runner.ipa .; cd -`
89
+ else
90
+ FileUtils.mkdir_p '../aws/packages/app/Payload'
91
+ FileUtils.cp_r app, '../aws/packages/app/Payload'
92
+ `cd ../aws/packages/app/; zip -r ../app.ipa .; cd -`
93
+ end
94
+ end
34
95
  ```
35
- rubocop -a
96
+
97
+
98
+ ## ANDROID Build APK's
99
+ you could use something like this.
100
+ after this you have the app-apk in `app/build/outputs/apk/app-debug.apk` and the testrunner in `app/build/outputs/apk/app-debug-androidTest-unaligned.apk`
101
+
102
+ ```ruby
103
+ gradle(task: 'assembleDebug')
104
+ gradle(task: 'assembleAndroidTest')
36
105
  ```
37
106
 
107
+ ## Credit
108
+ it is based on a custom action by @icapps (https://github.com/icapps/fastlane-configuration)
109
+ added the following:
110
+ * IOS Support for XCUITests
111
+ * support current `fastlane` version
112
+ * improve output
113
+ * make it available as a `fastlane` plugin
114
+
38
115
  ## Issues and Feedback
39
116
 
40
117
  For any other issues and feedback about this plugin, please submit it to this repository.
@@ -1,5 +1,4 @@
1
1
  require 'aws-sdk'
2
-
3
2
  module Fastlane
4
3
  module Actions
5
4
  class AwsDeviceFarmAction < Action
@@ -8,7 +7,7 @@ module Fastlane
8
7
  UI.message 'Preparing the upload to the device farm.'
9
8
 
10
9
  # Instantiate the client.
11
- @client = ::Aws::DeviceFarm::Client.new()
10
+ @client = ::Aws::DeviceFarm::Client.new
12
11
 
13
12
  # Fetch the project
14
13
  project = fetch_project params[:name]
@@ -34,7 +33,7 @@ module Fastlane
34
33
  if type == "ANDROID_APP"
35
34
  test_upload = create_project_upload project, test_path, 'INSTRUMENTATION_TEST_PACKAGE'
36
35
  else
37
-
36
+
38
37
  test_upload = create_project_upload project, test_path, 'XCTEST_UI_TEST_PACKAGE'
39
38
  end
40
39
 
@@ -60,7 +59,7 @@ module Fastlane
60
59
  if params[:wait_for_completion]
61
60
  UI.message 'Waiting for the run to complete. ☕️'
62
61
  run = wait_for_run run
63
- raise "#{run.message} 🙈" unless %w(PASSED WARNED).include? run.result
62
+ raise "#{run.message} Failed 🙈" unless %w(PASSED WARNED).include? run.result
64
63
 
65
64
  UI.message 'Successfully tested the application on the AWS device farm. ✅'.green
66
65
  else
@@ -151,8 +150,6 @@ module Fastlane
151
150
  platform == :ios || platform == :android
152
151
  end
153
152
 
154
- private
155
-
156
153
  POLLING_INTERVAL = 10
157
154
 
158
155
  def self.fetch_project(name)
@@ -204,9 +201,9 @@ module Fastlane
204
201
  # Prepare the test hash depening if you passed the test apk.
205
202
  test_hash = { type: 'BUILTIN_FUZZ' }
206
203
  if test_upload
207
- test_hash[:type] = 'XCTEST_UI'
204
+ test_hash[:type] = 'XCTEST_UI'
208
205
  if type == "ANDROID_APP"
209
- test_hash[:type] = 'INSTRUMENTATION'
206
+ test_hash[:type] = 'INSTRUMENTATION'
210
207
  end
211
208
  test_hash[:test_package_arn] = test_upload.arn
212
209
  end
@@ -231,10 +228,31 @@ module Fastlane
231
228
  run = fetch_run_status run
232
229
  end
233
230
  UI.message "The run ended with result #{run.result}."
231
+ UI.important "Minutes Counted: #{run.device_minutes.total}"
232
+
233
+ job = @client.list_jobs({
234
+ arn: run.arn
235
+ })
236
+
237
+ rows = []
238
+ job.jobs.each do |j|
239
+ if j.result == "PASSED"
240
+ status = "💚"
241
+ else
242
+ status = "💥"
243
+ end
244
+ rows << [status, j.name, j.device.form_factor, j.device.platform, j.device.os]
245
+ end
246
+ puts ""
247
+ puts Terminal::Table.new(
248
+ title: "Device Farm Summary".green,
249
+ headings: ["Status", "Name", "Form Factor", "Platform", "Version"],
250
+ rows: rows
251
+ )
252
+ puts ""
234
253
 
235
254
  run
236
255
  end
237
256
  end
238
257
  end
239
258
  end
240
-
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module AwsDeviceFarm
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,115 +1,115 @@
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.1
4
+ version: 0.1.2.pre.alpha.pre.1
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-10 00:00:00.000000000 Z
11
+ date: 2016-10-11 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:
112
- email: h.januschka@krone.at
112
+ email: helmut@januschka.com
113
113
  executables: []
114
114
  extensions: []
115
115
  extra_rdoc_files: []
@@ -120,7 +120,7 @@ files:
120
120
  - lib/fastlane/plugin/aws_device_farm/actions/aws_device_farm_action.rb
121
121
  - lib/fastlane/plugin/aws_device_farm/helper/aws_device_farm_helper.rb
122
122
  - lib/fastlane/plugin/aws_device_farm/version.rb
123
- homepage:
123
+ homepage: https://github.com/hjanuschka/fastlane-plugin-aws_device_farm
124
124
  licenses:
125
125
  - MIT
126
126
  metadata: {}
@@ -130,17 +130,17 @@ require_paths:
130
130
  - lib
131
131
  required_ruby_version: !ruby/object:Gem::Requirement
132
132
  requirements:
133
- - - ">="
133
+ - - ! '>='
134
134
  - !ruby/object:Gem::Version
135
135
  version: '0'
136
136
  required_rubygems_version: !ruby/object:Gem::Requirement
137
137
  requirements:
138
- - - ">="
138
+ - - ! '>'
139
139
  - !ruby/object:Gem::Version
140
- version: '0'
140
+ version: 1.3.1
141
141
  requirements: []
142
142
  rubyforge_project:
143
- rubygems_version: 2.4.8
143
+ rubygems_version: 2.4.5
144
144
  signing_key:
145
145
  specification_version: 4
146
146
  summary: Run UI Tests on AWS Devicefarm