parallel_report_portal 2.0.3 → 2.1.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 +4 -4
- data/README.md +21 -13
- data/lib/parallel_report_portal/configuration.rb +13 -1
- data/lib/parallel_report_portal/http.rb +6 -2
- data/lib/parallel_report_portal/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10a0ede4e1da6f5fc4788775483996e7ecf4a21009b06bfbbec5b49593c623bc
|
4
|
+
data.tar.gz: 8a0f3966ac4134f96e4a18e42e4b779943425d5d7cf9947dfc6afa10ee376859
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 380772393a3450a86df43444caa69e09b93d5b9b88a66ea658adc0baac40b064fe74e299cdec0dbf99c299a295c2d550914040ae87a65d82458c801e9f94ca2d
|
7
|
+
data.tar.gz: 5950fe72eb47bf2c195621d94faac14cfbb7a17b73aeae16f02a952b01a475f86e6a0901a8113ad7f00dd9d5081f5b162fd51266424cf5b7d6070b65162d3a5c
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
This gem is a Ruby-Cucumber formatter which sends the test output to [Report Portal](https://reportportal.io).
|
4
4
|
|
5
|
-
This formatter supports plain 'ol Cucumber tests and those wrapped with [parallel_tests](https://rubygems.org/gems/parallel_tests).
|
5
|
+
This formatter supports plain 'ol Cucumber tests and those wrapped with [parallel_tests](https://rubygems.org/gems/parallel_tests).
|
6
6
|
|
7
7
|
It also supports Cucumber 3.x and 4+ (Cucumber implementations using cucumber-messages).
|
8
8
|
|
@@ -30,20 +30,30 @@ The formatter supports configuration via a config file or via environment variab
|
|
30
30
|
|
31
31
|
#### Configuration file
|
32
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. Optionally, the config file keys may match those accepted through environment variables -- they may contain '
|
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. Optionally, the config file keys may match those accepted through environment variables -- they may contain 'rp*' and 'RP*'.
|
34
|
+
|
35
|
+
#### Configurable Timeouts
|
36
|
+
|
37
|
+
When running in parallel you might encounter some connection timeouts and these have been made configurable. You can configure the Report Portal yaml file with these attributes and set your own custom timeout values.
|
38
|
+
|
39
|
+
```yaml
|
40
|
+
idle_timeout: 100
|
41
|
+
open_timeout: 60
|
42
|
+
read_timeout: 60
|
43
|
+
```
|
34
44
|
|
35
45
|
#### Environment variables
|
36
46
|
|
37
47
|
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
48
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
49
|
+
- `RP_UUID` - the user's UUID for this Report Portal instance which must be created in advance
|
50
|
+
- `RP_ENDPOINT` - the endpoint for this Report Portal instance
|
51
|
+
- `RP_PROJECT` - the Report Portal project name which must be created in advance and this user added as a member
|
52
|
+
- `RP_LAUNCH` - the name of this 'launch'
|
53
|
+
- `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
|
54
|
+
- `RP_DESCRIPTION` - _optional_ a textual description of the launch
|
55
|
+
- `RP_TAGS` - _optional_ a string of comma separated tags
|
56
|
+
- `RP_ATTRIBUTES` - _optional_ a string of comma separated attributes
|
47
57
|
|
48
58
|
### With cucumber
|
49
59
|
|
@@ -61,9 +71,7 @@ cucumber -f ParallelReportPortal::Cucumber::Formatter --out /dev/null -f progres
|
|
61
71
|
|
62
72
|
```
|
63
73
|
parallel_cucumber -- -f ParallelReportPortal::Cucumber::Formatter -- features/
|
64
|
-
|
65
|
-
|
66
|
-
|
74
|
+
```
|
67
75
|
|
68
76
|
## Development
|
69
77
|
|
@@ -22,7 +22,7 @@ module ParallelReportPortal
|
|
22
22
|
# RP_TAGS:: A set of tags to pass to Report Portal for this launch. If these are set via an environment variable, provide a comma-separated string of tags
|
23
23
|
# RP_ATTRIBUTES:: A set of attribute tags to pass to Report Portal for this launch. If these are set via an environment variable, provide a comma-separated string of attributes
|
24
24
|
class Configuration
|
25
|
-
ATTRIBUTES = [:uuid, :endpoint, :project, :launch, :debug, :description, :tags, :attributes]
|
25
|
+
ATTRIBUTES = [:uuid, :endpoint, :project, :launch, :debug, :description, :tags, :attributes, :open_timeout, :idle_timeout, :read_timeout]
|
26
26
|
|
27
27
|
# @return [String] the Report Portal user UUID
|
28
28
|
attr_accessor :uuid
|
@@ -45,6 +45,12 @@ module ParallelReportPortal
|
|
45
45
|
# @return [Array<String>] an array of attributes to attach to this launch
|
46
46
|
# (Report Portal 5)
|
47
47
|
attr_reader :attributes
|
48
|
+
# @return [Integer] the number of seconds for the open connection to timeout
|
49
|
+
attr_accessor :open_timeout
|
50
|
+
# @return [Integer] the number of seconds for the open and idle connection to timeout
|
51
|
+
attr_accessor :idle_timeout
|
52
|
+
# @return [Integer] the number of seconds for the read connection to timeout
|
53
|
+
attr_accessor :read_timeout
|
48
54
|
|
49
55
|
|
50
56
|
# Create an instance of Configuration.
|
@@ -95,6 +101,12 @@ module ParallelReportPortal
|
|
95
101
|
end
|
96
102
|
end
|
97
103
|
|
104
|
+
# Simple method to obtain an attribute from this class or set default value
|
105
|
+
# param [symbol] a symbol version of the attribute
|
106
|
+
def fetch(key, default_value)
|
107
|
+
self.send(key).nil? ? default_value : self.send(key)
|
108
|
+
end
|
109
|
+
|
98
110
|
# Sets the attributes for the launch. If an array is provided, the array is used,
|
99
111
|
# if a string is provided, the string is broken into components by splitting
|
100
112
|
# on a comma.
|
@@ -39,7 +39,9 @@ module ParallelReportPortal
|
|
39
39
|
}
|
40
40
|
) do |f|
|
41
41
|
f.adapter :net_http_persistent, pool_size: 5 do |http|
|
42
|
-
http.idle_timeout = 100
|
42
|
+
http.idle_timeout = ParallelReportPortal.configuration.fetch(:idle_timeout, 100)
|
43
|
+
http.open_timeout = ParallelReportPortal.configuration.fetch(:open_timeout, 60)
|
44
|
+
http.read_timeout = ParallelReportPortal.configuration.fetch(:read_timeout, 60)
|
43
45
|
end
|
44
46
|
end
|
45
47
|
end
|
@@ -60,7 +62,9 @@ module ParallelReportPortal
|
|
60
62
|
conn.request :url_encoded
|
61
63
|
conn.adapter :net_http_persistent, pool_size: 5 do |http|
|
62
64
|
# yields Net::HTTP::Persistent
|
63
|
-
http.idle_timeout = 100
|
65
|
+
http.idle_timeout = ParallelReportPortal.configuration.fetch(:idle_timeout, 100)
|
66
|
+
http.open_timeout = ParallelReportPortal.configuration.fetch(:open_timeout, 60)
|
67
|
+
http.read_timeout = ParallelReportPortal.configuration.fetch(:read_timeout, 60)
|
64
68
|
end
|
65
69
|
end
|
66
70
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parallel_report_portal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nigel Brookes-Thomas
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2022-03-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: appraisal
|
@@ -234,7 +234,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
234
234
|
- !ruby/object:Gem::Version
|
235
235
|
version: '0'
|
236
236
|
requirements: []
|
237
|
-
rubygems_version: 3.2.
|
237
|
+
rubygems_version: 3.2.3
|
238
238
|
signing_key:
|
239
239
|
specification_version: 4
|
240
240
|
summary: Run Cucumber Tests in parallel and with Cucumber 3 and 4+
|