parallel_report_portal 2.0.0 → 2.0.1

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: 6d0688e9e7fbdbaa2fa1fc0ee6a8c444a243448e00ecf62d9d72ed339272d37a
4
- data.tar.gz: 66f939d035ac209acc6edf0180e5993a6c153ca28a2f54a56a2151ebd8dd908c
3
+ metadata.gz: 4e7791266b8182c87f0456af3f5a473d9757290a0d7c753753db088413aec9d5
4
+ data.tar.gz: c96a4e60af404fc80d9fa8427b2cc6dd1080871f1cdc9873c3834d0c7f3b59f2
5
5
  SHA512:
6
- metadata.gz: 5737d01908a1cb5d820d6fdfe5ffb72c91793767742c9de59edfaa33ce585e2d3937d72b59abc8680f7e10cf22fe84707b71685138b741a890dd663672576abe
7
- data.tar.gz: 14b703917ed3bb2393449f6ead61e3f2c245a0b5465fc7ae1a5a79e4b6411b98869dba5ae411222ca5a2f509bc57e28eefa4c92274a8f1b00411a1f7dffc90e9
6
+ metadata.gz: a2ce25379d17872648ce74db6b68f12d4e799d0c18b2eccf03d49a0ee8b14a9ecd7d30f02652667598687f26afa03d2c138ceb2988ac461ce223465019d2f91c
7
+ data.tar.gz: 91ad9f32747f427aefc47d29f751efd422fb300836fe054b6bb5e7965ffa430b272eb928d6661b490efecba2b3916262f57c81477a1fb9a5685936148c595af9
data/.gitignore CHANGED
@@ -10,6 +10,7 @@
10
10
 
11
11
  # Appraisal lock files
12
12
  /gemfiles/*.lock
13
+ Gemfile.lock
13
14
 
14
15
  # rspec failure tracking
15
16
  .rspec_status
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- parallel_report_portal (2.0.0)
4
+ parallel_report_portal (2.0.1)
5
5
  cucumber (>= 3.2)
6
6
  faraday (~> 1.0)
7
7
  net-http-persistent (~> 4.0)
@@ -11,7 +11,7 @@ PATH
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- activesupport (6.1.3.1)
14
+ activesupport (6.1.3.2)
15
15
  concurrent-ruby (~> 1.0, >= 1.0.2)
16
16
  i18n (>= 1.6, < 2)
17
17
  minitest (>= 5.1)
@@ -3,7 +3,7 @@ require 'tree'
3
3
 
4
4
  module ParallelReportPortal
5
5
  module Cucumber
6
- # Report object. This handles the management of the state heirarchy and
6
+ # Report object. This handles the management of the state hierarchy and
7
7
  # the issuing of the requests to the HTTP module.
8
8
  class Report
9
9
 
@@ -113,22 +113,21 @@ module ParallelReportPortal
113
113
  test_step = event.test_step
114
114
  result = event.result
115
115
  status = result.to_sym
116
- if !hook?(test_step)
116
+ detail = nil
117
+ if [:failed, :pending, :undefined].include?(status)
118
+ if [:failed, :pending].include?(status)
119
+ ex = result.exception
120
+ detail = sprintf("%s: %s\n %s", ex.class.name, ex.message, ex.backtrace.join("\n "))
121
+ elsif !hook?(test_step)
122
+ step_source = lookup_step_source(test_step)
123
+ detail = sprintf("Undefined step: %s:\n%s", step_source.text, step_source.source.last.backtrace_line)
124
+ end
125
+ elsif !hook?(test_step)
117
126
  step_source = lookup_step_source(test_step)
118
127
  detail = "#{step_source.text}"
119
-
120
- if [:failed, :pending, :undefined].include?(status)
121
- level = :error
122
- detail = if [:failed, :pending].include?(status)
123
- ex = result.exception
124
- sprintf("%s: %s\n %s", ex.class.name, ex.message, ex.backtrace.join("\n "))
125
- else
126
- sprintf("Undefined step: %s:\n%s", test_step.text, test_step.source.last.backtrace_line)
127
- end
128
-
129
- ParallelReportPortal.req_log(@test_case_id, detail, level, clock)
130
- end
131
128
  end
129
+ ParallelReportPortal.req_log(@test_case_id, detail, status_to_level(status), clock) if detail
130
+
132
131
  end
133
132
 
134
133
  private
@@ -176,7 +175,7 @@ module ParallelReportPortal
176
175
 
177
176
  def lookup_test_case(test_case)
178
177
  if using_cucumber_messages?
179
- @ast_lookup.gherkin_document(test_case.location.file).feature
178
+ @ast_lookup.scenario_source(test_case).scenario
180
179
  else
181
180
  test_case
182
181
  end
@@ -163,7 +163,7 @@ module ParallelReportPortal
163
163
  type: 'STEP',
164
164
  launch_id: launch_id,
165
165
  description: test_case.location.to_s,
166
- attributes: test_case.tags
166
+ attributes: test_case.tags.map(&:name)
167
167
  }.to_json
168
168
  end
169
169
  if resp.success?
@@ -1,3 +1,3 @@
1
1
  module ParallelReportPortal
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
@@ -5,7 +5,7 @@ require "parallel_report_portal/version"
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "parallel_report_portal"
7
7
  spec.version = ParallelReportPortal::VERSION
8
- spec.authors = ["Nigel Brookes-Thomas"]
8
+ spec.authors = ["Nigel Brookes-Thomas", "Thomas Feathers"]
9
9
  spec.email = ["nigel.brookes-thomas@dvla.gov.uk"]
10
10
 
11
11
  spec.summary = %q{Run Cucumber Tests in parallel and with Cucumber 3 and 4+}
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parallel_report_portal
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nigel Brookes-Thomas
8
+ - Thomas Feathers
8
9
  autorequire:
9
10
  bindir: exe
10
11
  cert_chain: []
11
- date: 2021-04-26 00:00:00.000000000 Z
12
+ date: 2021-05-11 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: appraisal