report_builder 0.1.3 → 0.1.4
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 +2 -3
- data/bin/report_builder +2 -2
- data/lib/report_builder.rb +8 -4
- metadata +29 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 931a3fb3ccb0332e2388061dfc7cc4eb78513c32
|
4
|
+
data.tar.gz: da3fa84f963257d00fe58188a11f24703b61e288
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7cd2806dcef56a2c14e7444f1b2a1937a2ac3c2917a57cbe5b4f56a823487e4cdd877b5b1904f1130cd992aaa01b55aa50dceb73889374976f6e92a81c800ba1
|
7
|
+
data.tar.gz: ab20c2dcd47c76b8a72c0ffb6262308e8e10df93bb021dbbf498f57096862bc371e68211f96f066fe5f0953b3f27ce2756b7ac9500539f04f5577b7446000d7e
|
data/README.md
CHANGED
@@ -17,7 +17,6 @@ gem install report_builder
|
|
17
17
|
|
18
18
|
* RDoc documentation [available on RubyDoc.info](http://www.rubydoc.info/gems/report_builder)
|
19
19
|
* Source code [available on GitHub](http://github.com/rajatthareja/ReportBuilder)
|
20
|
-
* Sample report [available here](http://www.rajatthareja.com/reportbuilder/sample.html)
|
21
20
|
|
22
21
|
## Usage
|
23
22
|
|
@@ -29,7 +28,7 @@ gem install report_builder
|
|
29
28
|
|--------|------|---------|--------|
|
30
29
|
| json_path | [String] / [Array] | (current directory) | json files path / array of json files or path |
|
31
30
|
| report_path | [String] | 'test_report' | output file path with file name without extension |
|
32
|
-
| report_types | [Array] | [:html] | :json, :html (output file types) |
|
31
|
+
| report_types | [Array] | [:html] | :json, :html, :retry (output file types) |
|
33
32
|
| report_tabs | [Array] | [:overview, :features] | :overview, :features, :scenarios, :errors (tabs to build) |
|
34
33
|
| report_title | [String] | 'Test Results' | report and html title |
|
35
34
|
| compress_images | [Boolean] | false | true / false (If true, the size of HTML report is reduced but takes more time to build report) |
|
@@ -75,7 +74,7 @@ gem install report_builder
|
|
75
74
|
|----------------|-------------|----------------------------------------------------------|
|
76
75
|
| -s, --source | x,y,z | List of json path or files |
|
77
76
|
| -o, --out | [PATH]NAME | Report path with name without extension |
|
78
|
-
| -f, --format | x,y,z | List of report format - html,json |
|
77
|
+
| -f, --format | x,y,z | List of report format - html,json,retry |
|
79
78
|
| -t, --tabs | x,y,z | List of report tabs - overview,features,scenarios,errors |
|
80
79
|
| -c, --compress | | Reduce report size if embedding images |
|
81
80
|
| -T, --title | TITLE | Report title |
|
data/bin/report_builder
CHANGED
@@ -25,7 +25,7 @@ opt_parser = OptionParser.new do |opts|
|
|
25
25
|
options[:report_path] = report_path
|
26
26
|
end
|
27
27
|
|
28
|
-
opts.on('-f','--format x,y,z', Array, 'List of report format - html,json') do |list|
|
28
|
+
opts.on('-f','--format x,y,z', Array, 'List of report format - html,json,retry') do |list|
|
29
29
|
options[:report_types] = list
|
30
30
|
end
|
31
31
|
|
@@ -63,4 +63,4 @@ end
|
|
63
63
|
|
64
64
|
opt_parser.parse!(ARGV)
|
65
65
|
|
66
|
-
ReportBuilder.build_report options
|
66
|
+
ReportBuilder.build_report options
|
data/lib/report_builder.rb
CHANGED
@@ -2,10 +2,6 @@ require 'json'
|
|
2
2
|
require 'builder'
|
3
3
|
require 'base64'
|
4
4
|
|
5
|
-
|
6
|
-
# new lines
|
7
|
-
|
8
|
-
|
9
5
|
# Add except method to Hash
|
10
6
|
class Hash
|
11
7
|
def except(*keys)
|
@@ -265,6 +261,14 @@ class ReportBuilder
|
|
265
261
|
puts "HTML test report generated: '#{@options[:report_path]}.html'"
|
266
262
|
end if @options[:report_types].include? 'HTML'
|
267
263
|
|
264
|
+
File.open(@options[:report_path] + '.retry', 'w:UTF-8') do |file|
|
265
|
+
all_features.each do |feature|
|
266
|
+
if feature['status'] == 'broken'
|
267
|
+
feature['elements'].each { |scenario| file.puts "#{feature['uri']}:#{scenario['line']}" if scenario['status'] == 'failed' }
|
268
|
+
end
|
269
|
+
end
|
270
|
+
end if @options[:report_types].include? 'RETRY'
|
271
|
+
|
268
272
|
[total_time, feature_data, scenario_data, step_data]
|
269
273
|
end
|
270
274
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: report_builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rajat Thareja
|
@@ -44,6 +44,34 @@ dependencies:
|
|
44
44
|
- - '>='
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: 1.8.1
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rake
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - <
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '13.0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - <
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '13.0'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: rspec
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - <
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '4.0'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - <
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '4.0'
|
47
75
|
description: Merge Cucumber JSON reports and build single HTML Test Report
|
48
76
|
email: rajat.thareja.1990@gmail.com
|
49
77
|
executables:
|