qat-reporter 6.2.1 → 6.2.2

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: 3c766cbf8a8d654087c3ab9a7b216efecce7ca7db49d44164f0ee58dee96664d
4
- data.tar.gz: 0c0f9ac7c2513328edd81f450e1f824a463ec642a62a58de42301e6276bc5304
3
+ metadata.gz: cee1fada9622bdf85a4eed4ae35b843ce9dae4569dbf2e8c552183117d39332f
4
+ data.tar.gz: ee2809f46036d1a8cb5d4064f2b92a7defdbb5c0259acf3843c36ffcfe0e8120
5
5
  SHA512:
6
- metadata.gz: f00bc11c0efe0fc3ee02e9ce424c96410309e1d5fc84f6a650abdd64909233eb9eecb3d2f848b6bf065ac7162b1e294dfc021896e0d846577878b2359c063727
7
- data.tar.gz: f45de5aab48bebe63fdb8058ab7d254449cee9cee8515a31802538355b7d09341dfdaf9425798d2073cf9a5692f2b6a58314af033ec6bf93f8a7ca9c55a80697
6
+ metadata.gz: 57feab6d04160266b2dde66f019774bab7ef20db3deb4c4b76fb82de16d30051f8237b119801d7948791803fa20921bf225ef9cc8be77aa98bdd331539fad040
7
+ data.tar.gz: b19eb7a94e3597f30502f64b9bef53af54b784cd6c2f5a00fcaa0c070955c368ddceb20013d90790c879334408091dae61448bad5c92adedc1df02d23fb9e0ef
@@ -96,8 +96,21 @@ module QAT
96
96
  test_run_id = QAT[:current_test_run_id]
97
97
  measurements = QAT::Reporter::Times.get_measures rescue []
98
98
 
99
+ test_status = if status.is_a? ::Cucumber::Core::Test::Result::Passed
100
+ if QAT::Reporter.const_defined?('Times')
101
+ Times.test_sla_status
102
+ else
103
+ "passed"
104
+ end
105
+ elsif status.is_a? ::Cucumber::Core::Test::Result::Failed
106
+ "failed"
107
+ else
108
+ "not_runned"
109
+ end
110
+
99
111
  test_run_info = {
100
112
  id: test_run_id,
113
+ test_status: test_status,
101
114
  timestamp: QAT[:test_start_timestamp]&.strftime("%FT%T%z"),
102
115
  measurements: []
103
116
  }
@@ -214,6 +214,10 @@ module QAT
214
214
  error_sla = QAT.configuration.dig(:qat, :reporter, :times, key, :sla_error)&.to_f
215
215
  end
216
216
 
217
+ #If no measure end found, returns measure with status error
218
+ unless QAT["#{key}_end".to_sym]
219
+ return warn_sla, error_sla, "Error"
220
+ end
217
221
 
218
222
  status = if error_sla && duration > error_sla
219
223
  "Error"
@@ -228,23 +232,21 @@ module QAT
228
232
 
229
233
 
230
234
  def self.test_sla_status
231
- measures = get_measures
232
- measures.any? do |measure_key, info|
235
+ measures = get_measures rescue []
236
+ status_results = []
237
+ measures&.each do |measure_key, info|
233
238
  sla_status = info.dig(:sla, :status)
239
+ log.debug "SLA status for measure with key: #{measure_key} is '#{sla_status}'"
240
+ status_results << sla_status
241
+ end
234
242
 
235
- test_status = case sla_status
236
- when "Passed"
237
- "passed"
238
- when "Warning"
239
- "passed with SLA Warning"
240
- else
241
- "passed with SLA Error"
242
- end
243
-
244
- log.debug "SLA status for measure with key: #{measure_key} is '#{test_status}'"
245
- return test_status
243
+ if status_results.include? 'Error'
244
+ return "passed with SLA Error"
245
+ elsif status_results.include? 'Warning'
246
+ return "passed with SLA Warning"
247
+ else
248
+ return "passed"
246
249
  end
247
- "passed"
248
250
  end
249
251
 
250
252
  #No start time value error class
@@ -3,6 +3,6 @@ module QAT
3
3
  # Namespace for QAT Reporter
4
4
  module Reporter
5
5
  # Represents QAT Reporter's version
6
- VERSION = '6.2.1'
6
+ VERSION = '6.2.2'
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qat-reporter
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.2.1
4
+ version: 6.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - QAT
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-21 00:00:00.000000000 Z
11
+ date: 2019-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: qat-cucumber