fastlane-plugin-aws_device_farm 0.3.15.pre.alpha.pre.121 → 0.3.15
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a4f91b2dcaa04d45f271873463033fa6067b8ecf5e2ba765081fd1b1228ed06
|
4
|
+
data.tar.gz: 201b87d7f51fc381eb6fd140aca875785cedeb156365a8a4f83dde4b5ed98a69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d432179968ddb5c007cf41402eed49e5c4ff8570b435ea8925497434e431ad2c8019d590aa681e7df7e11b10cf055ef87849dde09712ad47f747903790f9828e
|
7
|
+
data.tar.gz: d7d281db72d5348bf25fc5cbaf03e4f893d12efd8802c8fe686228e9f5639b2818691490c62cbc1eac976dd821c0eaaa567b7a91a87f0a65876df14f02918084
|
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'aws-sdk'
|
2
|
-
|
3
2
|
module Fastlane
|
4
3
|
module Actions
|
5
4
|
# rubocop:disable Metrics/ClassLength
|
@@ -70,8 +69,6 @@ module Fastlane
|
|
70
69
|
if params[:wait_for_completion]
|
71
70
|
UI.message 'Waiting for the run to complete. ☕️'
|
72
71
|
run = wait_for_run project, run, params
|
73
|
-
run = create_test_result run, params
|
74
|
-
|
75
72
|
if params[:allow_failed_tests] == false
|
76
73
|
if params[:allow_device_errors] == true
|
77
74
|
raise "#{run.message} Failed 🙈" unless %w[PASSED WARNED ERRORED].include? run.result
|
@@ -294,22 +291,6 @@ module Fastlane
|
|
294
291
|
is_string: false,
|
295
292
|
optional: true,
|
296
293
|
default_value: true
|
297
|
-
),
|
298
|
-
FastlaneCore::ConfigItem.new(
|
299
|
-
key: :junit_xml_output_path,
|
300
|
-
env_name: 'FL_JUNIT_XML_OUTPUT_PATH',
|
301
|
-
description: 'JUnit xml output path',
|
302
|
-
is_string: true,
|
303
|
-
optional: true,
|
304
|
-
default_value: "junit.xml"
|
305
|
-
),
|
306
|
-
FastlaneCore::ConfigItem.new(
|
307
|
-
key: :junit_xml,
|
308
|
-
env_name: 'FL_ALLOW_JUNIT_XML',
|
309
|
-
description: 'Do you create JUnit.xml?',
|
310
|
-
is_string: false,
|
311
|
-
optional: true,
|
312
|
-
default_value: false
|
313
294
|
)
|
314
295
|
]
|
315
296
|
end
|
@@ -436,16 +417,11 @@ module Fastlane
|
|
436
417
|
UI.verbose "PROJECT ARN: #{project.arn}."
|
437
418
|
ENV["AWS_DEVICE_FARM_PROJECT_ARN"] = project.arn
|
438
419
|
|
439
|
-
run
|
440
|
-
end
|
441
|
-
|
442
|
-
def self.create_test_result(run, params)
|
443
420
|
job = @client.list_jobs({
|
444
|
-
|
445
|
-
|
421
|
+
arn: run.arn
|
422
|
+
})
|
446
423
|
|
447
424
|
rows = []
|
448
|
-
test_results = {}
|
449
425
|
job.jobs.each do |j|
|
450
426
|
if j.result == "PASSED"
|
451
427
|
status = "💚 (#{j.result})"
|
@@ -455,48 +431,7 @@ module Fastlane
|
|
455
431
|
status = "💥 (#{j.result})"
|
456
432
|
end
|
457
433
|
rows << [status, j.name, j.device.form_factor, j.device.platform, j.device.os]
|
458
|
-
|
459
|
-
suite = @client.list_suites({
|
460
|
-
arn: j.arn
|
461
|
-
})
|
462
|
-
|
463
|
-
test_suites = []
|
464
|
-
suite.suites.each do |suite|
|
465
|
-
test = @client.list_tests({
|
466
|
-
arn: suite.arn
|
467
|
-
})
|
468
|
-
|
469
|
-
test_lists = []
|
470
|
-
test.tests.each do |test|
|
471
|
-
test_lists << {
|
472
|
-
"class_name" => suite.name,
|
473
|
-
"name" => test.name,
|
474
|
-
"time" => test.device_minutes.metered
|
475
|
-
}
|
476
|
-
end
|
477
|
-
|
478
|
-
test_suites << {
|
479
|
-
"name" => suite.name,
|
480
|
-
"tests" => suite.counters.total,
|
481
|
-
"failures" => suite.counters.failed,
|
482
|
-
"errors" => suite.counters.errored,
|
483
|
-
"time" => suite.device_minutes.metered,
|
484
|
-
"test_lists" => test_lists
|
485
|
-
}
|
486
|
-
|
487
|
-
# test results
|
488
|
-
test_results = {
|
489
|
-
"name" => j.name,
|
490
|
-
"tests" => j.counters.total,
|
491
|
-
"failures" => j.counters.failed,
|
492
|
-
"errors" => j.counters.errored,
|
493
|
-
"time" => j.device_minutes.metered,
|
494
|
-
"test_suites" => test_suites
|
495
|
-
}
|
496
|
-
Helper::AwsDeviceFarmHelper.create_junit_xml(test_results: test_results, file_path: params[:junit_xml_output_path]) if params[:junit_xml]
|
497
|
-
end
|
498
434
|
end
|
499
|
-
|
500
435
|
puts ""
|
501
436
|
puts Terminal::Table.new(
|
502
437
|
title: "Device Farm Summary".green,
|
@@ -507,7 +442,6 @@ module Fastlane
|
|
507
442
|
|
508
443
|
run
|
509
444
|
end
|
510
|
-
|
511
445
|
def self.get_run_url_from_arn(arn)
|
512
446
|
project_id = get_project_id_from_arn arn
|
513
447
|
run_id = get_run_id_from_arn arn
|
@@ -1,48 +1,12 @@
|
|
1
|
-
require 'rexml/document'
|
2
|
-
require 'fileutils'
|
3
|
-
|
4
1
|
module Fastlane
|
5
2
|
module Helper
|
6
3
|
class AwsDeviceFarmHelper
|
7
|
-
|
8
|
-
#
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
# test_suites
|
14
|
-
root = REXML::Element.new('testsuites')
|
15
|
-
root.add_attribute('name', "#{test_results['name']}")
|
16
|
-
root.add_attribute('tests', "#{test_results['tests']}")
|
17
|
-
root.add_attribute('failures', "#{test_results['failures']}")
|
18
|
-
root.add_attribute('time', "#{test_results['time']}")
|
19
|
-
doc.add_element(root)
|
20
|
-
|
21
|
-
test_results['test_suites'].each do |suite|
|
22
|
-
testsuite = REXML::Element.new('testsuite')
|
23
|
-
testsuite.add_attribute('name', "#{suite['name']}")
|
24
|
-
testsuite.add_attribute('tests', "#{suite['tests']}")
|
25
|
-
testsuite.add_attribute('errors', "#{suite['errors']}")
|
26
|
-
testsuite.add_attribute('failures', "#{suite['failures']}")
|
27
|
-
testsuite.add_attribute('time', "#{suite['time']}")
|
28
|
-
root.add_element(testsuite)
|
29
|
-
|
30
|
-
suite['test_lists'].each do |test|
|
31
|
-
testcase = REXML::Element.new('testcase')
|
32
|
-
testcase.add_attribute('classname', "#{test['class_name']}")
|
33
|
-
testcase.add_attribute('name', "#{test['name']}")
|
34
|
-
testcase.add_attribute('time', "#{test['time']}")
|
35
|
-
testsuite.add_element(testcase)
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
# output
|
40
|
-
FileUtils.mkdir_p(File.dirname(file_path))
|
41
|
-
File.open(file_path, 'w') do |file|
|
42
|
-
doc.write(file, indent=2)
|
43
|
-
end
|
4
|
+
# class methods that you define here become available in your action
|
5
|
+
# as `Helper::AwsDeviceFarmHelper.your_method`
|
6
|
+
#
|
7
|
+
def self.show_message
|
8
|
+
UI.message("Hello from the aws_device_farm plugin helper!")
|
44
9
|
end
|
45
|
-
|
46
10
|
end
|
47
11
|
end
|
48
12
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-aws_device_farm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.15
|
4
|
+
version: 0.3.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Helmut Januschka
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|
@@ -136,12 +136,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
136
136
|
version: '0'
|
137
137
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
138
138
|
requirements:
|
139
|
-
- - "
|
139
|
+
- - ">="
|
140
140
|
- !ruby/object:Gem::Version
|
141
|
-
version:
|
141
|
+
version: '0'
|
142
142
|
requirements: []
|
143
143
|
rubyforge_project:
|
144
|
-
rubygems_version: 2.7.
|
144
|
+
rubygems_version: 2.7.2
|
145
145
|
signing_key:
|
146
146
|
specification_version: 4
|
147
147
|
summary: Run UI Tests on AWS Devicefarm
|