mini_autobot 0.8.0 → 1.0.0

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: 80059c285bd2170b2b4b42a57868e69a44e64e0f
4
- data.tar.gz: 52b6b819430bd80b071b2af54feb9da0b22ba88b
3
+ metadata.gz: 6c214dc6a65bed2d41f3c7ec0f9bb5ac7df24263
4
+ data.tar.gz: 8db93a791eb4f29d235f775b4d42aebefac0c184
5
5
  SHA512:
6
- metadata.gz: afedd247da6343ded1820432cd07f18b454939ef0501f94a7e8ac38f03fc04a65d6c53cc36e243f86d94df152a538bbde45976942bf919c7e0caf688ea6fcbb6
7
- data.tar.gz: 2f23f89c7a8704f0f5b4dc980767c7fa538f1f6c40da64a47644ce9b1a021688b4b83e5a42c58c6195b4ff092316520a7fddaae578aef40b1e840113224f97f9
6
+ metadata.gz: 0a9e36fa370f2cc199cab1ce0d07f0d8342d71074a2bf3cb46e6808b831596d426458c795f63079ba9fbac2e7f597696059d93f8251ae20d68cf0a9ab0261d2a
7
+ data.tar.gz: 81b617d5e61a17786da396bb9011bf3a8c6b46e237dc3117b511be2d69f65a36998c86d9485152512277cd1547d484b180f25caf0e07d4f66c3c0445d83aa885
@@ -2,7 +2,6 @@
2
2
  # modules and classes in the hierarchy:
3
3
  #
4
4
  # * `Connector` provides support for drivers and connector profiles;
5
- # * `Emails` introduces email-specific drivers for MiniAutobot;
6
5
  # * `PageObjects` provides a hierarchy of page objects, page modules, widgets,
7
6
  # and overlays;
8
7
  # * `Settings` provides support for internal MiniAutobot settings; and
@@ -57,7 +56,5 @@ require_relative 'page_objects'
57
56
  require_relative 'parallel'
58
57
  require_relative 'settings'
59
58
 
60
- require_relative 'emails'
61
-
62
59
  require_relative 'test_case'
63
60
  require_relative 'console'
@@ -66,6 +66,59 @@ module MiniAutobot
66
66
  end
67
67
  end
68
68
 
69
+ # Aggregate all individual test_*.t files
70
+ # replace them with one file - test_aggregated_result.tap
71
+ # so they will be considered as one test plan by tap result parser
72
+ def aggregate_tap_results
73
+ results_count = Dir.glob("#{@result_dir}/*.t").size
74
+ File.open("#{@result_dir}/test_aggregated_result.tap", 'a+') do |result_file|
75
+ result_stats = {
76
+ 'pass' => 0,
77
+ 'fail' => 0,
78
+ 'errs' => 0,
79
+ 'todo' => 0,
80
+ 'omit' => 0
81
+ }
82
+ result_stats_line_start = ' # 1 tests:'
83
+ result_file.puts "1..#{results_count}"
84
+ file_count = 0
85
+ Dir.glob("#{@result_dir}/*.t") do |filename|
86
+ file_count += 1
87
+ File.open(filename, 'r') do |file|
88
+ breakpoint_line = 0
89
+ file.each_with_index do |line, index|
90
+ next if index == 0 || (breakpoint_line > 0 && index > breakpoint_line)
91
+ if line.start_with?(result_stats_line_start)
92
+ pass, fail, errs, todo, omit = line.match(/(\d+) pass, (\d+) fail, (\d+) errs, (\d+) todo, (\d+) omit/).captures
93
+ one_test_result = {
94
+ 'pass' => pass.to_i,
95
+ 'fail' => fail.to_i,
96
+ 'errs' => errs.to_i,
97
+ 'todo' => todo.to_i,
98
+ 'omit' => omit.to_i
99
+ }
100
+ result_stats = result_stats.merge(one_test_result) { |k, total, one| total + one }
101
+ breakpoint_line = index
102
+ elsif line.strip == '#'
103
+ next
104
+ else
105
+ if line.start_with?('ok 1') || line.start_with?('not ok 1')
106
+ line_begin, line_end = line.split('1 -')
107
+ result_file.puts [line_begin, line_end].join("#{file_count} -")
108
+ else
109
+ result_file.puts line
110
+ end
111
+ end
112
+ end
113
+ end
114
+ File.delete(filename)
115
+ end
116
+ result_file.puts ' #'
117
+ result_file.puts " # #{results_count} tests: #{result_stats['pass']} pass, #{result_stats['fail']} fail, #{result_stats['errs']} errs, #{result_stats['todo']} todo, #{result_stats['omit']} omit"
118
+ result_file.puts " # [00:00:00.00 0.00t/s 00.0000s/t] Finished at: #{Time.now}"
119
+ end
120
+ end
121
+
69
122
  def count_autobot_process
70
123
  counting_process_output = IO.popen "ps -ef | grep 'bin/#{@static_run_command}' -c"
71
124
  counting_process_output.readlines[0].to_i - 1 # minus grep process
@@ -104,6 +104,7 @@ module MiniAutobot
104
104
  parallel.clean_result!
105
105
  parallel.run_in_parallel!
106
106
  parallel.remove_redundant_tap if MiniAutobot.settings.rerun_failure
107
+ parallel.aggregate_tap_results
107
108
  exit
108
109
  end
109
110
 
@@ -83,17 +83,6 @@ module MiniAutobot
83
83
  @driver.save_screenshot("logs/#{name}.png")
84
84
  end
85
85
 
86
- # Save test name to ever_failed_tests file only for the first time it failed
87
- def save_to_ever_failed
88
- ever_failed_tests = 'logs/tap_results/ever_failed_tests'
89
- File.open(ever_failed_tests, 'a') do |f|
90
- existing_failed_tests = File.readlines(ever_failed_tests).map do |line|
91
- line.delete "\n"
92
- end
93
- f.puts name unless existing_failed_tests.include? name
94
- end
95
- end
96
-
97
86
  # Create new/override same file ever_failed_tests.json with fail count
98
87
  def json_save_to_ever_failed
99
88
  ever_failed_tests = 'logs/tap_results/ever_failed_tests.json'
@@ -1,3 +1,3 @@
1
1
  module MiniAutobot
2
- VERSION = '0.8.0'
2
+ VERSION = '1.0.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mini_autobot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ripta Pasay
@@ -10,174 +10,174 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-02-03 00:00:00.000000000 Z
13
+ date: 2016-02-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - ~>
19
+ - - "~>"
20
20
  - !ruby/object:Gem::Version
21
21
  version: '4.2'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
- - - ~>
26
+ - - "~>"
27
27
  - !ruby/object:Gem::Version
28
28
  version: '4.2'
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: faker
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
- - - ~>
33
+ - - "~>"
34
34
  - !ruby/object:Gem::Version
35
35
  version: '1.4'
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - ~>
40
+ - - "~>"
41
41
  - !ruby/object:Gem::Version
42
42
  version: '1.4'
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: minitap
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - ~>
47
+ - - "~>"
48
48
  - !ruby/object:Gem::Version
49
49
  version: 0.5.3
50
50
  type: :runtime
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
- - - ~>
54
+ - - "~>"
55
55
  - !ruby/object:Gem::Version
56
56
  version: 0.5.3
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: pry
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
- - - ~>
61
+ - - "~>"
62
62
  - !ruby/object:Gem::Version
63
63
  version: '0.10'
64
64
  type: :runtime
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
- - - ~>
68
+ - - "~>"
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0.10'
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: minitest
73
73
  requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
- - - ~>
75
+ - - "~>"
76
76
  - !ruby/object:Gem::Version
77
77
  version: 5.4.0
78
78
  type: :runtime
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
- - - ~>
82
+ - - "~>"
83
83
  - !ruby/object:Gem::Version
84
84
  version: 5.4.0
85
85
  - !ruby/object:Gem::Dependency
86
86
  name: selenium-webdriver
87
87
  requirement: !ruby/object:Gem::Requirement
88
88
  requirements:
89
- - - ~>
89
+ - - "~>"
90
90
  - !ruby/object:Gem::Version
91
91
  version: '2.46'
92
92
  type: :runtime
93
93
  prerelease: false
94
94
  version_requirements: !ruby/object:Gem::Requirement
95
95
  requirements:
96
- - - ~>
96
+ - - "~>"
97
97
  - !ruby/object:Gem::Version
98
98
  version: '2.46'
99
99
  - !ruby/object:Gem::Dependency
100
100
  name: rest-client
101
101
  requirement: !ruby/object:Gem::Requirement
102
102
  requirements:
103
- - - ~>
103
+ - - "~>"
104
104
  - !ruby/object:Gem::Version
105
105
  version: '1.8'
106
106
  type: :runtime
107
107
  prerelease: false
108
108
  version_requirements: !ruby/object:Gem::Requirement
109
109
  requirements:
110
- - - ~>
110
+ - - "~>"
111
111
  - !ruby/object:Gem::Version
112
112
  version: '1.8'
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: rake
115
115
  requirement: !ruby/object:Gem::Requirement
116
116
  requirements:
117
- - - '>='
117
+ - - ">="
118
118
  - !ruby/object:Gem::Version
119
119
  version: '0'
120
120
  type: :development
121
121
  prerelease: false
122
122
  version_requirements: !ruby/object:Gem::Requirement
123
123
  requirements:
124
- - - '>='
124
+ - - ">="
125
125
  - !ruby/object:Gem::Version
126
126
  version: '0'
127
127
  - !ruby/object:Gem::Dependency
128
128
  name: rspec
129
129
  requirement: !ruby/object:Gem::Requirement
130
130
  requirements:
131
- - - ~>
131
+ - - "~>"
132
132
  - !ruby/object:Gem::Version
133
133
  version: 3.3.0
134
134
  type: :development
135
135
  prerelease: false
136
136
  version_requirements: !ruby/object:Gem::Requirement
137
137
  requirements:
138
- - - ~>
138
+ - - "~>"
139
139
  - !ruby/object:Gem::Version
140
140
  version: 3.3.0
141
141
  - !ruby/object:Gem::Dependency
142
142
  name: guard
143
143
  requirement: !ruby/object:Gem::Requirement
144
144
  requirements:
145
- - - '>='
145
+ - - ">="
146
146
  - !ruby/object:Gem::Version
147
147
  version: '0'
148
148
  type: :development
149
149
  prerelease: false
150
150
  version_requirements: !ruby/object:Gem::Requirement
151
151
  requirements:
152
- - - '>='
152
+ - - ">="
153
153
  - !ruby/object:Gem::Version
154
154
  version: '0'
155
155
  - !ruby/object:Gem::Dependency
156
156
  name: guard-minitest
157
157
  requirement: !ruby/object:Gem::Requirement
158
158
  requirements:
159
- - - '>='
159
+ - - ">="
160
160
  - !ruby/object:Gem::Version
161
161
  version: '0'
162
162
  type: :development
163
163
  prerelease: false
164
164
  version_requirements: !ruby/object:Gem::Requirement
165
165
  requirements:
166
- - - '>='
166
+ - - ">="
167
167
  - !ruby/object:Gem::Version
168
168
  version: '0'
169
169
  - !ruby/object:Gem::Dependency
170
170
  name: yard
171
171
  requirement: !ruby/object:Gem::Requirement
172
172
  requirements:
173
- - - '>='
173
+ - - ">="
174
174
  - !ruby/object:Gem::Version
175
175
  version: '0'
176
176
  type: :development
177
177
  prerelease: false
178
178
  version_requirements: !ruby/object:Gem::Requirement
179
179
  requirements:
180
- - - '>='
180
+ - - ">="
181
181
  - !ruby/object:Gem::Version
182
182
  version: '0'
183
183
  description: |-
@@ -190,9 +190,9 @@ executables:
190
190
  extensions: []
191
191
  extra_rdoc_files: []
192
192
  files:
193
- - .gitignore
194
- - .rspec
195
- - .ruby-version
193
+ - ".gitignore"
194
+ - ".rspec"
195
+ - ".ruby-version"
196
196
  - Gemfile
197
197
  - LICENSE
198
198
  - README.md
@@ -201,9 +201,6 @@ files:
201
201
  - lib/mini_autobot.rb
202
202
  - lib/mini_autobot/connector.rb
203
203
  - lib/mini_autobot/console.rb
204
- - lib/mini_autobot/emails.rb
205
- - lib/mini_autobot/emails/mailbox.rb
206
- - lib/mini_autobot/endeca/base.rb
207
204
  - lib/mini_autobot/init.rb
208
205
  - lib/mini_autobot/logger.rb
209
206
  - lib/mini_autobot/page_objects.rb
@@ -241,17 +238,17 @@ require_paths:
241
238
  - lib
242
239
  required_ruby_version: !ruby/object:Gem::Requirement
243
240
  requirements:
244
- - - '>='
241
+ - - ">="
245
242
  - !ruby/object:Gem::Version
246
243
  version: '0'
247
244
  required_rubygems_version: !ruby/object:Gem::Requirement
248
245
  requirements:
249
- - - '>='
246
+ - - ">="
250
247
  - !ruby/object:Gem::Version
251
248
  version: '0'
252
249
  requirements: []
253
250
  rubyforge_project:
254
- rubygems_version: 2.0.14
251
+ rubygems_version: 2.4.5.1
255
252
  signing_key:
256
253
  specification_version: 4
257
254
  summary: Web automation framework on minitest, selenium webdriver, and page objects.
@@ -1,5 +0,0 @@
1
- module MiniAutobot
2
- module Emails; end
3
- end
4
-
5
- require_relative 'emails/mailbox'
@@ -1,15 +0,0 @@
1
- require 'net/imap'
2
-
3
- module MiniAutobot
4
- module Emails
5
-
6
- class Mailbox
7
-
8
- def initialize(**opts)
9
- end
10
-
11
- end
12
-
13
- end
14
- end
15
-
@@ -1,6 +0,0 @@
1
- module MiniAutobot
2
- module Endeca
3
- class Base
4
- end
5
- end
6
- end