parallel_report_portal 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.drone.yml +21 -0
- data/.gitignore +18 -0
- data/.rspec +1 -0
- data/Appraisals +15 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +148 -0
- data/LICENSE.txt +22 -0
- data/ParallelReportPortal.drawio +1 -0
- data/README.md +76 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/gemfiles/.bundle/config +2 -0
- data/gemfiles/cucumber_3.2.gemfile +7 -0
- data/gemfiles/cucumber_4.1.gemfile +7 -0
- data/gemfiles/cucumber_5.2.gemfile +7 -0
- data/gemfiles/cucumber_6.0.gemfile +7 -0
- data/lib/parallel_report_portal.rb +41 -0
- data/lib/parallel_report_portal/clock.rb +13 -0
- data/lib/parallel_report_portal/configuration.rb +138 -0
- data/lib/parallel_report_portal/cucumber/formatter.rb +73 -0
- data/lib/parallel_report_portal/cucumber/report.rb +226 -0
- data/lib/parallel_report_portal/file_utils.rb +62 -0
- data/lib/parallel_report_portal/http.rb +228 -0
- data/lib/parallel_report_portal/version.rb +3 -0
- data/parallel_report_portal.gemspec +45 -0
- metadata +241 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 6d0688e9e7fbdbaa2fa1fc0ee6a8c444a243448e00ecf62d9d72ed339272d37a
|
4
|
+
data.tar.gz: 66f939d035ac209acc6edf0180e5993a6c153ca28a2f54a56a2151ebd8dd908c
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5737d01908a1cb5d820d6fdfe5ffb72c91793767742c9de59edfaa33ce585e2d3937d72b59abc8680f7e10cf22fe84707b71685138b741a890dd663672576abe
|
7
|
+
data.tar.gz: 14b703917ed3bb2393449f6ead61e3f2c245a0b5465fc7ae1a5a79e4b6411b98869dba5ae411222ca5a2f509bc57e28eefa4c92274a8f1b00411a1f7dffc90e9
|
data/.drone.yml
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
kind: pipeline
|
2
|
+
name: default
|
3
|
+
|
4
|
+
platform:
|
5
|
+
os: linux
|
6
|
+
arch: amd64
|
7
|
+
|
8
|
+
steps:
|
9
|
+
- name: Build & Publish
|
10
|
+
pull: if-not-exists
|
11
|
+
image: 714782054810.dkr.ecr.eu-west-2.amazonaws.com/base-images/qe-ruby:2.7.0
|
12
|
+
commands:
|
13
|
+
- apk add --update git --update alpine-sdk --no-cache
|
14
|
+
- gem install bundler
|
15
|
+
- bundle
|
16
|
+
- gem install nexus
|
17
|
+
- gem build parallel_report_portal.gemspec
|
18
|
+
- gem nexus --url https://nexus.tooling.dvla.gov.uk/repository/gem-private/ parallel_report_portal*gem
|
19
|
+
when:
|
20
|
+
branch:
|
21
|
+
- master
|
data/.gitignore
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--require spec_helper
|
data/Appraisals
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
appraise 'cucumber-3.2' do
|
2
|
+
gem 'cucumber', '~> 3.2'
|
3
|
+
end
|
4
|
+
|
5
|
+
appraise 'cucumber-4.1' do
|
6
|
+
gem 'cucumber', '~> 4.1'
|
7
|
+
end
|
8
|
+
|
9
|
+
appraise 'cucumber-5.2' do
|
10
|
+
gem 'cucumber', '~> 5.2.0'
|
11
|
+
end
|
12
|
+
|
13
|
+
appraise 'cucumber-6.0' do
|
14
|
+
gem 'cucumber', '~> 6.0.0'
|
15
|
+
end
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,148 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
parallel_report_portal (2.0.0)
|
5
|
+
cucumber (>= 3.2)
|
6
|
+
faraday (~> 1.0)
|
7
|
+
net-http-persistent (~> 4.0)
|
8
|
+
parallel_tests (>= 2.29.1)
|
9
|
+
rubytree (~> 1.0)
|
10
|
+
|
11
|
+
GEM
|
12
|
+
remote: https://rubygems.org/
|
13
|
+
specs:
|
14
|
+
activesupport (6.1.3.1)
|
15
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
16
|
+
i18n (>= 1.6, < 2)
|
17
|
+
minitest (>= 5.1)
|
18
|
+
tzinfo (~> 2.0)
|
19
|
+
zeitwerk (~> 2.3)
|
20
|
+
addressable (2.7.0)
|
21
|
+
public_suffix (>= 2.0.2, < 5.0)
|
22
|
+
appraisal (2.4.0)
|
23
|
+
bundler
|
24
|
+
rake
|
25
|
+
thor (>= 0.14.0)
|
26
|
+
builder (3.2.4)
|
27
|
+
bump (0.10.0)
|
28
|
+
coderay (1.1.3)
|
29
|
+
concurrent-ruby (1.1.8)
|
30
|
+
connection_pool (2.2.5)
|
31
|
+
crack (0.4.5)
|
32
|
+
rexml
|
33
|
+
cucumber (6.0.0)
|
34
|
+
builder (~> 3.2, >= 3.2.4)
|
35
|
+
cucumber-core (~> 9.0, >= 9.0.0)
|
36
|
+
cucumber-create-meta (~> 4.0, >= 4.0.0)
|
37
|
+
cucumber-cucumber-expressions (~> 12.1, >= 12.1.1)
|
38
|
+
cucumber-gherkin (~> 18.1, >= 18.1.0)
|
39
|
+
cucumber-html-formatter (~> 13.0, >= 13.0.0)
|
40
|
+
cucumber-messages (~> 15.0, >= 15.0.0)
|
41
|
+
cucumber-wire (~> 5.0, >= 5.0.0)
|
42
|
+
diff-lcs (~> 1.4, >= 1.4.4)
|
43
|
+
mime-types (~> 3.3, >= 3.3.1)
|
44
|
+
multi_test (~> 0.1, >= 0.1.2)
|
45
|
+
sys-uname (~> 1.2, >= 1.2.2)
|
46
|
+
cucumber-core (9.0.0)
|
47
|
+
cucumber-gherkin (~> 18.1, >= 18.1.0)
|
48
|
+
cucumber-messages (~> 15.0, >= 15.0.0)
|
49
|
+
cucumber-tag-expressions (~> 3.0, >= 3.0.1)
|
50
|
+
cucumber-create-meta (4.0.0)
|
51
|
+
cucumber-messages (~> 15.0, >= 15.0.0)
|
52
|
+
sys-uname (~> 1.2, >= 1.2.2)
|
53
|
+
cucumber-cucumber-expressions (12.1.1)
|
54
|
+
cucumber-gherkin (18.1.1)
|
55
|
+
cucumber-messages (~> 15.0, >= 15.0.0)
|
56
|
+
cucumber-html-formatter (13.0.0)
|
57
|
+
cucumber-messages (~> 15.0, >= 15.0.0)
|
58
|
+
cucumber-messages (15.0.0)
|
59
|
+
protobuf-cucumber (~> 3.10, >= 3.10.8)
|
60
|
+
cucumber-tag-expressions (3.0.1)
|
61
|
+
cucumber-wire (5.0.0)
|
62
|
+
cucumber-core (~> 9.0, >= 9.0.0)
|
63
|
+
cucumber-cucumber-expressions (~> 12.1, >= 12.1.1)
|
64
|
+
cucumber-messages (~> 15.0, >= 15.0.0)
|
65
|
+
diff-lcs (1.4.4)
|
66
|
+
faraday (1.4.1)
|
67
|
+
faraday-excon (~> 1.1)
|
68
|
+
faraday-net_http (~> 1.0)
|
69
|
+
faraday-net_http_persistent (~> 1.1)
|
70
|
+
multipart-post (>= 1.2, < 3)
|
71
|
+
ruby2_keywords (>= 0.0.4)
|
72
|
+
faraday-excon (1.1.0)
|
73
|
+
faraday-net_http (1.0.1)
|
74
|
+
faraday-net_http_persistent (1.1.0)
|
75
|
+
ffi (1.15.0)
|
76
|
+
hashdiff (1.0.1)
|
77
|
+
i18n (1.8.10)
|
78
|
+
concurrent-ruby (~> 1.0)
|
79
|
+
json (2.5.1)
|
80
|
+
method_source (1.0.0)
|
81
|
+
middleware (0.1.0)
|
82
|
+
mime-types (3.3.1)
|
83
|
+
mime-types-data (~> 3.2015)
|
84
|
+
mime-types-data (3.2021.0225)
|
85
|
+
minitest (5.14.4)
|
86
|
+
multi_test (0.1.2)
|
87
|
+
multipart-post (2.1.1)
|
88
|
+
net-http-persistent (4.0.1)
|
89
|
+
connection_pool (~> 2.2)
|
90
|
+
parallel (1.20.1)
|
91
|
+
parallel_tests (3.7.0)
|
92
|
+
parallel
|
93
|
+
protobuf-cucumber (3.10.8)
|
94
|
+
activesupport (>= 3.2)
|
95
|
+
middleware
|
96
|
+
thor
|
97
|
+
thread_safe
|
98
|
+
pry (0.14.1)
|
99
|
+
coderay (~> 1.1)
|
100
|
+
method_source (~> 1.0)
|
101
|
+
public_suffix (4.0.6)
|
102
|
+
rake (10.5.0)
|
103
|
+
rexml (3.2.5)
|
104
|
+
rspec (3.10.0)
|
105
|
+
rspec-core (~> 3.10.0)
|
106
|
+
rspec-expectations (~> 3.10.0)
|
107
|
+
rspec-mocks (~> 3.10.0)
|
108
|
+
rspec-core (3.10.1)
|
109
|
+
rspec-support (~> 3.10.0)
|
110
|
+
rspec-expectations (3.10.1)
|
111
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
112
|
+
rspec-support (~> 3.10.0)
|
113
|
+
rspec-mocks (3.10.2)
|
114
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
115
|
+
rspec-support (~> 3.10.0)
|
116
|
+
rspec-support (3.10.2)
|
117
|
+
ruby2_keywords (0.0.4)
|
118
|
+
rubytree (1.0.0)
|
119
|
+
json (~> 2.1)
|
120
|
+
structured_warnings (~> 0.3)
|
121
|
+
structured_warnings (0.4.0)
|
122
|
+
sys-uname (1.2.2)
|
123
|
+
ffi (~> 1.1)
|
124
|
+
thor (1.1.0)
|
125
|
+
thread_safe (0.3.6)
|
126
|
+
tzinfo (2.0.4)
|
127
|
+
concurrent-ruby (~> 1.0)
|
128
|
+
webmock (3.12.2)
|
129
|
+
addressable (>= 2.3.6)
|
130
|
+
crack (>= 0.3.2)
|
131
|
+
hashdiff (>= 0.4.0, < 2.0.0)
|
132
|
+
zeitwerk (2.4.2)
|
133
|
+
|
134
|
+
PLATFORMS
|
135
|
+
ruby
|
136
|
+
|
137
|
+
DEPENDENCIES
|
138
|
+
appraisal (~> 2.4)
|
139
|
+
bump (~> 0.8)
|
140
|
+
bundler (~> 2.0)
|
141
|
+
parallel_report_portal!
|
142
|
+
pry (~> 0.12)
|
143
|
+
rake (~> 10.0)
|
144
|
+
rspec (~> 3.0)
|
145
|
+
webmock (~> 3.12)
|
146
|
+
|
147
|
+
BUNDLED WITH
|
148
|
+
2.1.4
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2021 DVLA
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
22
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
<mxfile host="app.diagrams.net" modified="2021-04-22T09:58:53.040Z" agent="5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Safari/605.1.15" etag="E0Nkgb-ib2T7GJS6ShHm" version="14.6.5" type="device"><diagram id="mxBefgqayhPC2E-suDkA" name="Page-1">5Vddb5swFP01PHbiK2AeUyDtpFT7yLRujw7cAJOJkTEJ9NfPBFNCSGgyJWqlPeF7fI3tc48PRjHctHxgOIufaAhE0dWwVAxP0XXdRBPxqJGqQSamBCKWhA2kdcAieQEJqhItkhDyXiKnlPAk64MBXa8h4D0MM0a3/bQVJf1ZMxzBAFgEmAzR5yTkcYMi3e7wR0iiuJ1Zs5ymJ8VtstxJHuOQbvcgw1cMl1HKm1ZaukBq8lpemnGzE72vC2Ow5ucMeF68zIOn9LFCyy9T59sC55+1O0uujVfthiEU+5chZTymEV1j4nfoPaPFOoT6raqIupw5pZkANQH+Ac4rWUxccCqgmKdE9ooFs+qXHL8LftfBp0kbeuV+p1fJaLhjSUJOCxbAyDZb5WAWAR/JM5u8moO9CSSfD0BTEOsRCQwI5smmrxEspRa95nXVEA1ZkAuKI9+7waSQM7lFUKRLYIOq9WuyjRMOiwzvONmKg9nnf5UQ4lJC2W6s4U185Jlj/G6AcShHGZG9d5qOpN7lgdcdGW+746O1ZyLeOzqWeiMa9QGN3s/5VCA/IOf5Val0bE+17ZtRabw3lcaAyu+QCQdQdIuIue+XQplWVLe+ChSTobsQIpwb3iYW51lj56ukrItxyLTtTy1/1BQuYNpyDohGQ6LREZ7RrXhG72HL/26v5pn2an8oezVPivmAe/HlzupmSIX77sh5S73Lphbz5QmfuKp6NfXQJ47I96hP3Ey/zv9xrbDP1L3xoXRvn9S9OqNM3Fv56AVDu/irOEOu77pXUjs69Oob3i9E2N3Pd317fzmG/xc=</diagram></mxfile>
|
data/README.md
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
# ParallelReportPortal
|
2
|
+
|
3
|
+
This gem is a Ruby-Cucumber formatter which sends the test output to [Report Portal](https://reportportal.io).
|
4
|
+
|
5
|
+
This formatter supports plain 'ol Cucumber tests and those wrapped with [parallel_tests](https://rubygems.org/gems/parallel_tests).
|
6
|
+
|
7
|
+
It also supports Cucumber 3.x and 4+ (Cucumber implementations using cucumber-messages).
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Add this line to your application's Gemfile:
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
gem 'parallel_report_portal'
|
15
|
+
```
|
16
|
+
|
17
|
+
And then execute:
|
18
|
+
|
19
|
+
$ bundle
|
20
|
+
|
21
|
+
Or install it yourself as:
|
22
|
+
|
23
|
+
$ gem install parallel_report_portal
|
24
|
+
|
25
|
+
## Usage
|
26
|
+
|
27
|
+
### Configuration
|
28
|
+
|
29
|
+
The formatter supports configuration via a config file or via environment variables
|
30
|
+
|
31
|
+
#### Configuration file
|
32
|
+
|
33
|
+
It will search for a file called `report_portal.yml` or `REPORT_PORTAL.YML` in `./config` and `./`. It expects this file to contain the standard Report Portal configuration options -- see the Report Portal documentation.
|
34
|
+
|
35
|
+
#### Environment variables
|
36
|
+
|
37
|
+
It will search for the following environment variables which may be in upper or lowercase (the official client defers to lower case, this is available here for compatibility).
|
38
|
+
|
39
|
+
* `RP_UUID` - the user's UUID for this Report Portal instance which must be created in advance
|
40
|
+
* `RP_ENDPOINT` - the endpoint for this Report Portal instance
|
41
|
+
* `RP_PROJECT` - the Report Portal project name which must be created in advance and this user added as a member
|
42
|
+
* `RP_LAUNCH` - the name of this 'launch'
|
43
|
+
* `RP_DEBUG` - *optional* if set to the string value `true` it will instruct Report Portal to add the output of these tests to the debug tab
|
44
|
+
* `RP_DESCRIPTION` - *optional* a textual description of the launch
|
45
|
+
* `RP_TAGS` - *optional* a string of comma separated tags
|
46
|
+
* `RP_ATTRIBUTES` - *optional* a string of comma separated attributes
|
47
|
+
|
48
|
+
### With cucumber
|
49
|
+
|
50
|
+
```
|
51
|
+
cucumber -f ParallelReportPortal::Cucumber::Formatter
|
52
|
+
```
|
53
|
+
|
54
|
+
With cucumber and another formatter (so you can see the testoutput)
|
55
|
+
|
56
|
+
```
|
57
|
+
cucumber -f ParallelReportPortal::Cucumber::Formatter --out /dev/null -f progress
|
58
|
+
```
|
59
|
+
|
60
|
+
### With parallel_tests
|
61
|
+
|
62
|
+
```
|
63
|
+
parallel_cucumber -- -f ParallelReportPortal::Cucumber::Formatter -- features/
|
64
|
+
```
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
## Development
|
69
|
+
|
70
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
71
|
+
|
72
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
73
|
+
|
74
|
+
## Contributing
|
75
|
+
|
76
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/dvla/dvla-reportportal-ruby.
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "parallel_report_portal"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
require "parallel_report_portal/clock"
|
2
|
+
require "parallel_report_portal/configuration"
|
3
|
+
require "parallel_report_portal/file_utils"
|
4
|
+
require "parallel_report_portal/http"
|
5
|
+
require "parallel_report_portal/version"
|
6
|
+
require 'parallel_tests'
|
7
|
+
|
8
|
+
module ParallelReportPortal
|
9
|
+
class Error < StandardError; end
|
10
|
+
|
11
|
+
extend ParallelReportPortal::HTTP
|
12
|
+
extend ParallelReportPortal::FileUtils
|
13
|
+
extend ParallelReportPortal::Clock
|
14
|
+
|
15
|
+
# Returns the configuration object, initializing it if necessary.
|
16
|
+
#
|
17
|
+
# @return [Configuration] the configuration object
|
18
|
+
def self.configuration
|
19
|
+
@configuration ||= Configuration.new
|
20
|
+
end
|
21
|
+
|
22
|
+
# Configures the Report Portal environment.
|
23
|
+
#
|
24
|
+
# @yieldparam [Configuration] config the configuration object yielded to the block
|
25
|
+
def self.configure(&block)
|
26
|
+
yield configuration
|
27
|
+
end
|
28
|
+
|
29
|
+
at_exit do
|
30
|
+
if ParallelReportPortal.parallel?
|
31
|
+
if ParallelTests.first_process?
|
32
|
+
ParallelTests.wait_for_other_processes_to_finish
|
33
|
+
delete_file(launch_id_file)
|
34
|
+
delete_file(hierarchy_file)
|
35
|
+
end
|
36
|
+
else
|
37
|
+
delete_file(launch_id_file)
|
38
|
+
delete_file(hierarchy_file)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|