fastlane-plugin-xcode_test_reporter 0.1.4 → 0.1.5

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: a7baa38123f0c18c411849475491a0ed97905a3cdec4335b83343b1c534dc674
4
- data.tar.gz: 8f2a6cde89e5cdbbefe39262ddc9deb09781697198ac8963b30b5dba59f9fd74
3
+ metadata.gz: 7474a3181cb08114d9ae593d8017b0eecf001a20c5885b3a596acd95b8cbf575
4
+ data.tar.gz: ccde43e88a5cbcd83351e383781f8a20c3607ffa3fe251b6f695d79485712c60
5
5
  SHA512:
6
- metadata.gz: 6d7623caa4a07207a4e7dda5b6c3ac2e0e797ac253b28692957017f76d6a3ea071ea1218c3e88ce399afbc97934630844af6ad95d3291c475dd2cb68ce47ca66
7
- data.tar.gz: 6a90287a886cb38f0d28ab240c8846592cea970ef46ab8e61bc9d4ff57b4426b881af8e14f3142ade4d82a5225978c229d64c429b0763bf54de200570667ce16
6
+ metadata.gz: b008d1891beb058152ff1094b0669168af231885f57263c11c3bf7808b329d6eddeab25c3f2d1db8da944dced8174eb2ec9a08b7fc1323262a93a9006b96e2bd
7
+ data.tar.gz: a4efedb75ef16cf4dbaba95e6ac1d803618267041f315beeac8e62a77eb53e13764aaa3506bffc930cc4f282d28838a25897f0186fc10ee227812e6961e73102
@@ -27,12 +27,17 @@ module Fastlane
27
27
  UI.user_error!("xcode-test-reporter command failed.")
28
28
  end
29
29
 
30
+ resultJson = JSON.parse(resultText)
31
+
30
32
  result = {}
31
- JSON.parse(resultText).each
32
- result.each do |report|
33
+
34
+ resultJson.each do |report|
33
35
  result[report["file"]] = report["success"]
34
- UI.message "Generated: #{report["file"]}"
35
- UI.test_failure!("Tests failed") if fail_build && !report["success"]
36
+ UI.message "Generated: #{report["file"]}, success?: #{report["success"]}"
37
+ end
38
+
39
+ resultJson.each do |report|
40
+ UI.test_failure!("Tests failed") if params[:fail_build] && !report["success"]
36
41
  end
37
42
 
38
43
  return result
@@ -51,10 +56,10 @@ module Fastlane
51
56
  end
52
57
 
53
58
  def self.return_value
59
+ "A hash with the key being the path of the generated file, the value being if the tests were successful"
54
60
  end
55
61
 
56
62
  def self.details
57
- # Optional:
58
63
  "The `Xcode Test Reporter` Generates JUnit or HTML report from Xcode `plist` test report files."
59
64
  end
60
65
 
@@ -73,7 +78,7 @@ module Fastlane
73
78
  FastlaneCore::ConfigItem.new(key: :format,
74
79
  env_name: "XCODE_TEST_REPORTER_FORMAT",
75
80
  description: "The report format to output for (one of 'html', 'junit', or comma-separated values)",
76
- default_value: "junit",
81
+ default_value: "junit,html",
77
82
  optional: true,
78
83
  type: String),
79
84
  FastlaneCore::ConfigItem.new(key: :fail_build,
@@ -81,7 +86,7 @@ module Fastlane
81
86
  description: "Should this step stop the build if the tests fail?",
82
87
  default_value: false,
83
88
  optional: true,
84
- type: String)
89
+ type: Boolean)
85
90
  ]
86
91
  end
87
92
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module XcodeTestReporter
3
- VERSION = "0.1.4"
3
+ VERSION = "0.1.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-xcode_test_reporter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taisuke Hori