qat-reporter 6.1.5 → 6.1.6

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: d7de307438cf6fac6df892b2f3282146ca3ccd2c03220cf84824a7700d265910
4
- data.tar.gz: f6414bdff29202284a4c7c67104bcd3b3041b2a9c008142181789f417195bc1b
3
+ metadata.gz: c472c073be384c393248ea50ea2b0ce4c5e2473dcd614090efca12456a39fc2f
4
+ data.tar.gz: 938784c3d81995383b715134df2b5ff8d439a003622080728ee4e4464e468aa3
5
5
  SHA512:
6
- metadata.gz: 2a47f75ae6dc3270af5902721d1c01020e240f84faccb93a72c9fd859d21396dddb2cff1f072b9f94a02ef05bf7b27e3e51edf03b2b53d8f6d76d6c1979bae86
7
- data.tar.gz: db1c7075ab7126e1f22520d6a114ec6828b89cfce348271468f46cde429f822be7b8e0c65e1f072bea4cfc73e84ac1ceb19997b777e5856c806bbf92cc00e13f
6
+ metadata.gz: f07bc65341d0112603ecf0d1a94a1aa5b15267ed1c420faf6ffee6f3d85e6d6568e941ef3a2db7016d3a16e996221a72ba689dd25c0dfc5a84f2c269982858ff
7
+ data.tar.gz: 857e70d2bbd82ac0f9f3ee807784ce6489109180f5abc32124f59931b669eca762e9616e7fa331d712028f11ab21224929ac73d9de1b979f84d032922693f078
@@ -91,40 +91,30 @@ module QAT
91
91
 
92
92
  #@api private
93
93
  def after_test_case(_, status)
94
- duration = ::Cucumber::Formatter::DurationExtractor.new(status).result_duration
95
- human_duration = format_duration(duration)
96
-
97
-
98
94
  test_run_id = QAT[:current_test_run_id]
99
-
100
95
  measurements = QAT::Reporter::Times.get_measures rescue []
101
96
 
102
97
  test_run_info = {
103
98
  id: test_run_id,
104
- timestamp: Time.now.strftime("%FT%T%z"),
99
+ timestamp: QAT[:test_start_timestamp]&.strftime("%FT%T%z"),
105
100
  measurements: []
106
101
  }
107
102
 
108
- unless measurements == [] || measurements == {}
109
- measurements.each do |id, measure|
110
- @measurement_id = id
111
- @measurement_name = measure[:name]
112
-
113
- unless @measurement_id.nil?
114
- measurements = {
115
- id: @measurement_id,
116
- name: @measurement_name,
117
- timestamp: Time.now.strftime("%FT%T%z"),
118
- time: {
119
- secs: duration,
120
- human: human_duration
121
- }
122
- }
123
-
124
- test_run_info[:measurements] << measurements
125
- end
103
+ measurements.each do |id, measure|
104
+ if id
105
+ minutes, seconds = measure[:duration].divmod(60)
106
+ test_run_info[:measurements] << {
107
+ id: id,
108
+ name: measure[:name],
109
+ timestamp: measure[:start].strftime("%FT%T%z"),
110
+ time: {
111
+ secs: measure[:duration],
112
+ human: "#{minutes}m #{'%02.0f' % seconds}s"
113
+ }
114
+ }
126
115
  end
127
116
  end
117
+
128
118
  if @current_scenario.is_a?(::Cucumber::Core::Ast::ScenarioOutline)
129
119
  @outline_scenario_info[:test_runs] << test_run_info
130
120
  else
@@ -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.1.5'
6
+ VERSION = '6.1.6'
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.1.5
4
+ version: 6.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - QAT
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-10 00:00:00.000000000 Z
11
+ date: 2019-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: qat-cucumber