blinka-reporter 0.6.0 → 0.6.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/CHANGELOG.md +10 -2
- data/README.md +10 -9
- data/lib/blinka_reporter/client.rb +13 -8
- data/lib/blinka_reporter/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c1fc7642c8c305df691452e7c08bf3d0f5cd3f93942fe05123727e7190ce43c
|
4
|
+
data.tar.gz: 5695c3b9e7e5db14f9584515a06b1abbbe36f40900f90226e8f8cf8bfdc6922a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e3b2bfaf92e19ac3630f3bd89f84f5f53ad065b3c41e47fa8a1f0f80f2300b68ce6eec6368ebd50b9bfa5208ddf75c3c206e5875bbc440bca6ad403c24fe79e
|
7
|
+
data.tar.gz: 2449352484f17be048e5b84c37a715e2130402832481a61534a344ccba7cedb42074d653570f513d33cfbe13907ab5846946b3fe52519804e4893e6de75009a9
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [0.6.1] - 2022-02-27
|
11
|
+
|
12
|
+
- Rspec
|
13
|
+
- Improve handling of newlines in backtrace
|
14
|
+
- Adds more testing
|
15
|
+
- Handles multiple screenshot tags
|
16
|
+
|
10
17
|
## [0.6.0] - 2022-02-20
|
11
18
|
|
12
19
|
- Adds support for Rspec.
|
@@ -130,8 +137,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
130
137
|
|
131
138
|
- Handle inconsistency in source_location of test result in Minitest for different versions.
|
132
139
|
|
133
|
-
[unreleased]: https://github.com/davidwessman/blinka_reporter/compare/v0.6.
|
134
|
-
[0.
|
140
|
+
[unreleased]: https://github.com/davidwessman/blinka_reporter/compare/v0.6.1...HEAD
|
141
|
+
[0.6.1]: https://github.com/davidwessman/blinka_reporter/compare/v0.6.0...v0.6.1
|
142
|
+
[0.6.0]: https://github.com/davidwessman/blinka_reporter/compare/v0.5.2...v0.6.0
|
135
143
|
[0.5.2]: https://github.com/davidwessman/blinka_reporter/compare/v0.5.1...v0.5.2
|
136
144
|
[0.5.1]: https://github.com/davidwessman/blinka_reporter/compare/v0.5.0...v0.5.1
|
137
145
|
[0.5.0]: https://github.com/davidwessman/blinka_reporter/compare/v0.4.0...v0.5.0
|
data/README.md
CHANGED
@@ -2,7 +2,8 @@
|
|
2
2
|
|
3
3
|
## What does this gem do?
|
4
4
|
|
5
|
-
|
5
|
+
Generate a test results report for Minitest or interpret a junit-report from Rspec.
|
6
|
+
These results can then be [reported](#how-to-send-report-to-blinka) to [Blinka](#what-is-blinka) which posts your test results directly in your Github Pull Requests.
|
6
7
|
|
7
8
|
## How do I install the gem?
|
8
9
|
|
@@ -51,13 +52,13 @@ bundle exec rspec --formatter RspecJunitFormatter --out ./rspec.xml
|
|
51
52
|
|
52
53
|
1. Output your test results as described [above](#how-to-generate-test-report-in-the-right-format).
|
53
54
|
1. Configure `BLINKA_TEAM_ID`, `BLINKA_TEAM_SECRET`, `BLINKA_REPOSITORY`.
|
54
|
-
1. `bundle exec
|
55
|
+
1. `bundle exec blinka_reporter --path {./blinka_results.json,./rspec.xml} --blinka`
|
55
56
|
|
56
57
|
## How can I send report in Github Action?
|
57
58
|
|
58
59
|
Add a step to your Github Action Workflow after running tests:
|
59
60
|
|
60
|
-
|
61
|
+
```yaml
|
61
62
|
- name: Minitest
|
62
63
|
env:
|
63
64
|
BLINKA_JSON: true
|
@@ -70,8 +71,8 @@ Add a step to your Github Action Workflow after running tests:
|
|
70
71
|
BLINKA_TAG: ""
|
71
72
|
BLINKA_TEAM_ID: ${{ secrets.BLINKA_TEAM_ID }}
|
72
73
|
BLINKA_TEAM_SECRET: ${{ secrets.BLINKA_TEAM_SECRET }}
|
73
|
-
run: bundle exec
|
74
|
-
|
74
|
+
run: bundle exec blinka_reporter --path ./blinka_results.json --blinka
|
75
|
+
```
|
75
76
|
|
76
77
|
```yaml
|
77
78
|
- name: Rspec
|
@@ -83,8 +84,8 @@ Add a step to your Github Action Workflow after running tests:
|
|
83
84
|
BLINKA_TAG: ""
|
84
85
|
BLINKA_TEAM_ID: ${{ secrets.BLINKA_TEAM_ID }}
|
85
86
|
BLINKA_TEAM_SECRET: ${{ secrets.BLINKA_TEAM_SECRET }}
|
86
|
-
run: bundle exec
|
87
|
-
|
87
|
+
run: bundle exec blinka_reporter --path ./rspec.xml --blinka
|
88
|
+
```
|
88
89
|
|
89
90
|
`BLINKA_TAG` is optional and can be used to separate different reports, for example when using a build matrix.
|
90
91
|
|
@@ -115,7 +116,7 @@ By first using `BLINKA_JSON` it will create a clean file, `BLINKA_APPEND` will a
|
|
115
116
|
BLINKA_TAG: ""
|
116
117
|
BLINKA_TEAM_ID: ${{ secrets.BLINKA_TEAM_ID }}
|
117
118
|
BLINKA_TEAM_SECRET: ${{ secrets.BLINKA_TEAM_SECRET }}
|
118
|
-
run: bundle exec
|
119
|
+
run: bundle exec blinka_reporter --path ./blinka_results.json --blinka
|
119
120
|
```
|
120
121
|
|
121
122
|
## How can I report tests in TAP-format?
|
@@ -126,7 +127,7 @@ Generate your test results like [above](#how-to-generate-test-report-in-the-righ
|
|
126
127
|
replace `<path>` with your json or xml file.
|
127
128
|
|
128
129
|
```sh
|
129
|
-
bundle exec
|
130
|
+
bundle exec blinka_reporter --tap --path <path>
|
130
131
|
|
131
132
|
TAP version 13
|
132
133
|
1..14
|
@@ -86,9 +86,11 @@ module BlinkaReporter
|
|
86
86
|
failure =
|
87
87
|
test_case.nodes.select { |node| node.name == 'failure' }.first
|
88
88
|
if failure
|
89
|
-
result[:image] = get_image_path(failure.text)
|
90
89
|
result[:result] = 'fail'
|
91
|
-
|
90
|
+
|
91
|
+
# Needs to be double quotation marks to work properly
|
92
|
+
result[:backtrace] = failure.text.split("\n")
|
93
|
+
result[:image] = get_image_path(result[:backtrace])
|
92
94
|
result[:message] = failure.attributes[:message]
|
93
95
|
end
|
94
96
|
else
|
@@ -98,12 +100,15 @@ module BlinkaReporter
|
|
98
100
|
end
|
99
101
|
end
|
100
102
|
|
101
|
-
def self.get_image_path(
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
103
|
+
def self.get_image_path(backtrace)
|
104
|
+
backtrace.each do |text|
|
105
|
+
path = /^(\[Screenshot\]|\[Screenshot Image\]):\s([\S]*)$/.match(text)
|
106
|
+
next if path.nil?
|
107
|
+
path = path[-1]
|
108
|
+
next unless File.exist?(path)
|
109
|
+
return path
|
110
|
+
end
|
111
|
+
nil
|
107
112
|
end
|
108
113
|
end
|
109
114
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blinka-reporter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Wessman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-02-
|
11
|
+
date: 2022-02-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|