rubotium 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 10c1b1c9fe24a60628e1d733d2f7d5918c8f9f99
4
- data.tar.gz: 2cf29b67d928011a428bc5e8201f0d642ebcd71d
3
+ metadata.gz: 48b483815d07baf40aafa3998baaab636d1bd452
4
+ data.tar.gz: 4dc54a8afa9c1947c0758233acaf9486aa2e7418
5
5
  SHA512:
6
- metadata.gz: 9d59688e826e4fc69997b7fe721a97c474d618b5200b94f1a5ccab380fae101e25d9c562b186f8bd6e725ee59ade02830578d708eb4b1c11dd4aabafc8cd920d
7
- data.tar.gz: c575b257dfc780d3f693e686c76aa1b38e88b4dfef79e8567934abaa083e4440d560d9a2ec8252627447d10121c2accd4b9375204db89f13c13d74de3b60191f
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(results, path_to_file)
8
- @xml = Builder::XmlMarkup.new :target => ensure_io(path_to_file), :indent => 2
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 :classname=>test.package_name, :name=>test.test_name, :time=>test.time do
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
@@ -1,3 +1,3 @@
1
1
  module Rubotium
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
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.results, "#{device.serial}_#{opts[:report]}")
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.2
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-18 00:00:00.000000000 Z
11
+ date: 2014-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler