rubotium 0.0.3 → 0.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 48b483815d07baf40aafa3998baaab636d1bd452
4
- data.tar.gz: 4dc54a8afa9c1947c0758233acaf9486aa2e7418
3
+ metadata.gz: c8d2713d08a8ec60ecaa7277615c145a5bbe436b
4
+ data.tar.gz: 2ea6a4ca2872a4337a6ea47b34c54e00c6088550
5
5
  SHA512:
6
- metadata.gz: 5b6e90bed5c0f8f9dda4ec0ca1dbe63a4da936309aa0ceeffa9ed6af911defc00921250b76b61fcaebfe4b63a847c4b16b0079065ffc8755a16b4d85bf24349b
7
- data.tar.gz: 87780cbb770d0d8beee2ba96c4d21623a599a5738b66bb8749c2fdf177506c563f3526fc3bcc41c067bcd6d8c39d3a96e83b1214cf19128ec89619361a758460
6
+ metadata.gz: 68954818a9d17051921527e42dbed48bd43ea3cdbd2ffe9559d7537098db79e96d016c710cbac99d0220b64378a82a65b5ee55f876b44cd92dfa3656e62c262f
7
+ data.tar.gz: e9250e52f6aba83e0ec5c650a36a82a6e8cbeaa12ff05efe62dc74798e9d81bf7e23f7d1d4b0c73ff6ebfbee57019c03c6916f5e1dc06eac18c8184cdd7ce7b2
data/lib/rubotium.rb CHANGED
@@ -55,16 +55,6 @@ module Rubotium
55
55
  devices = Devices.new(opts[:device_matcher]).all
56
56
  test_suites = Grouper.new(test_suites, devices.count).create_groups
57
57
 
58
- devices.each{|device|
59
- device.uninstall application_package.name
60
- device.install application_package.path
61
- } if application_package.valid?
62
-
63
- devices.each{|device|
64
- device.uninstall tests_package.name
65
- device.install tests_package.path
66
- } if tests_package.valid?
67
-
68
58
  devices.each_with_index{|device, index|
69
59
  device.test_package_name = tests_package.name
70
60
  device.test_runner_name = test_runner || "android.test.InstrumentationTestRunner"
@@ -72,6 +62,10 @@ module Rubotium
72
62
  }
73
63
 
74
64
  devices = Parallel.map(devices, :in_processes=> devices.count) {|device|
65
+ device.uninstall application_package.name
66
+ device.install application_package.path
67
+ device.uninstall tests_package.name
68
+ device.install tests_package.path
75
69
  device.run_tests
76
70
  device
77
71
  }
@@ -12,14 +12,14 @@ module Rubotium
12
12
  @xml = Builder::XmlMarkup.new :target => ensure_io(report_path), :indent => 2
13
13
 
14
14
  xml.testsuites do
15
- results.each{|package_name, tests|
16
- start_test_suite(package_name, tests)
15
+ results.each{|_, tests|
16
+ start_test_suite(tests)
17
17
  }
18
18
  end
19
19
  end
20
20
  private
21
21
  attr_reader :report_file_path, :device_serial, :results
22
- def start_test_suite(package_name, tests)
22
+ def start_test_suite(tests)
23
23
  failures = get_failures(tests)
24
24
  errors = get_errors(tests)
25
25
  tests_time = get_tests_time(tests)
@@ -27,7 +27,7 @@ module Rubotium
27
27
  params = {
28
28
  :errors => errors,
29
29
  :failures => failures,
30
- :name => package_name,
30
+ :name => device_serial,
31
31
  :tests => tests_count,
32
32
  :time => tests_time,
33
33
  :timestamp => Time.now
@@ -41,7 +41,7 @@ module Rubotium
41
41
  end
42
42
 
43
43
  def print_testcase(test)
44
- xml.testcase(:classname=>"#{@device_serial}.#{test.package_name}", :name=>test.test_name, :time=>test.time) do
44
+ xml.testcase(:classname=>test.package_name, :name=>test.test_name, :time=>test.time) do
45
45
  has_failures(test)
46
46
  has_errors(test)
47
47
  end
@@ -1,3 +1,3 @@
1
1
  module Rubotium
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubotium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Slawomir Smiechura