barthes 0.0.7 → 0.0.8
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.
- data/lib/barthes/cli.rb +1 -0
- data/lib/barthes/reporter/junit_xml.rb +14 -16
- data/lib/barthes/version.rb +1 -1
- metadata +1 -1
data/lib/barthes/cli.rb
CHANGED
@@ -16,6 +16,7 @@ module Barthes
|
|
16
16
|
on 'd', 'dryrun', 'not run test but show just structure', argument: :optional, as: :count
|
17
17
|
on 'c', 'cache', 'cache path', argument: :optional, default: './barthes-cache.json'
|
18
18
|
on 'r', 'reporters', 'reporters to use', argument: :optional, as: Array
|
19
|
+
on 'j', 'junit-xml', 'junit xml output path', argument: :optional
|
19
20
|
end
|
20
21
|
@opt.to_hash
|
21
22
|
end
|
@@ -31,22 +31,20 @@ module Barthes
|
|
31
31
|
end
|
32
32
|
end
|
33
33
|
when 'action'
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
@xml.tag!(:'system-out', stdout)
|
49
|
-
end
|
34
|
+
name = [parents, "##{json.last['number'].to_s} #{json[1]}"].join('.')
|
35
|
+
@xml.testcase(name: name) do
|
36
|
+
case json.last['status']
|
37
|
+
when 'skipped'
|
38
|
+
@xml.skipped
|
39
|
+
when 'failure'
|
40
|
+
when 'error'
|
41
|
+
end
|
42
|
+
if json.last['status'] != 'skipped' && json.last['request'] && json.last['response']
|
43
|
+
stdout = "request:\n"
|
44
|
+
stdout += "#{JSON.pretty_generate(json.last['request'])}\n"
|
45
|
+
stdout += "response:\n"
|
46
|
+
stdout += "#{JSON.pretty_generate(json.last['response'])}\n"
|
47
|
+
@xml.tag!(:'system-out', stdout)
|
50
48
|
end
|
51
49
|
end
|
52
50
|
else
|
data/lib/barthes/version.rb
CHANGED