rubotium 0.0.2 → 0.0.3
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/lib/rubotium/formatters/junit_formatter.rb +12 -3
- data/lib/rubotium/version.rb +1 -1
- data/lib/rubotium.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48b483815d07baf40aafa3998baaab636d1bd452
|
4
|
+
data.tar.gz: 4dc54a8afa9c1947c0758233acaf9486aa2e7418
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b6e90bed5c0f8f9dda4ec0ca1dbe63a4da936309aa0ceeffa9ed6af911defc00921250b76b61fcaebfe4b63a847c4b16b0079065ffc8755a16b4d85bf24349b
|
7
|
+
data.tar.gz: 87780cbb770d0d8beee2ba96c4d21623a599a5738b66bb8749c2fdf177506c563f3526fc3bcc41c067bcd6d8c39d3a96e83b1214cf19128ec89619361a758460
|
@@ -4,8 +4,12 @@ module Rubotium
|
|
4
4
|
module Formatters
|
5
5
|
class JunitFormatter
|
6
6
|
attr_reader :xml
|
7
|
-
def initialize(
|
8
|
-
@
|
7
|
+
def initialize(device, path_to_file)
|
8
|
+
@device_serial = device.serial
|
9
|
+
@results = device.results
|
10
|
+
@report_file_path = path_to_file
|
11
|
+
|
12
|
+
@xml = Builder::XmlMarkup.new :target => ensure_io(report_path), :indent => 2
|
9
13
|
|
10
14
|
xml.testsuites do
|
11
15
|
results.each{|package_name, tests|
|
@@ -14,6 +18,7 @@ module Rubotium
|
|
14
18
|
end
|
15
19
|
end
|
16
20
|
private
|
21
|
+
attr_reader :report_file_path, :device_serial, :results
|
17
22
|
def start_test_suite(package_name, tests)
|
18
23
|
failures = get_failures(tests)
|
19
24
|
errors = get_errors(tests)
|
@@ -36,7 +41,7 @@ module Rubotium
|
|
36
41
|
end
|
37
42
|
|
38
43
|
def print_testcase(test)
|
39
|
-
xml.testcase
|
44
|
+
xml.testcase(:classname=>"#{@device_serial}.#{test.package_name}", :name=>test.test_name, :time=>test.time) do
|
40
45
|
has_failures(test)
|
41
46
|
has_errors(test)
|
42
47
|
end
|
@@ -74,6 +79,10 @@ module Rubotium
|
|
74
79
|
}.count
|
75
80
|
end
|
76
81
|
|
82
|
+
def report_path
|
83
|
+
"#{device_serial}_#{report_file_path}"
|
84
|
+
end
|
85
|
+
|
77
86
|
def ensure_io(path_to_file)
|
78
87
|
File.open(path_to_file, 'w')
|
79
88
|
end
|
data/lib/rubotium/version.rb
CHANGED
data/lib/rubotium.rb
CHANGED
@@ -78,7 +78,7 @@ module Rubotium
|
|
78
78
|
|
79
79
|
puts "Tests took: #{Time.at(Time.now-startTime).utc.strftime("%H:%M:%S")}"
|
80
80
|
devices.each{|device|
|
81
|
-
Formatters::JunitFormatter.new(device
|
81
|
+
Formatters::JunitFormatter.new(device, opts[:report])
|
82
82
|
}
|
83
83
|
end
|
84
84
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubotium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Slawomir Smiechura
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|