testmgr 0.3.1.pre → 0.3.2.pre

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: c788171781d05e43fe0bb67af44a10298917bdce
4
- data.tar.gz: 30952ea5a9c7fb6b371ba34ea7178d4066340944
3
+ metadata.gz: 30bcfe33a3d3440a6a4e12ffc0d2bc24ad2aaa8f
4
+ data.tar.gz: a09aa6cd802d14829567ee94673a50ec1bfb866d
5
5
  SHA512:
6
- metadata.gz: baaf2dd58fa586a0e04ad62b201d23bc296e0c421633a5a3bee5e8712b5ef0f261f196ac62c84ae809be818383c8d4d675c893fa8d29bb24768fb8c30bd9d981
7
- data.tar.gz: eacb47d26ede485337c6da4b1d6307d87ddfbd3a36c2cbe663415d5fceb28b984d915f85895369924b48b94621957ff21149729c67104d09a9bf2f93f090ef91
6
+ metadata.gz: 80cc826e99cce045e38eaa1d18da6ed253246a8c87b5d113a8f3a11596ea58741ad5abca6d18f44d60700d297e7a2ae599a01f630342af0af130d61e607aed95
7
+ data.tar.gz: 1d327f1f8108681bb3e6051d8b5ec10d8ced3c080e94d6a35b5a9ae0f6878e38e9e2e24b4b501fe3c63559219c890a54f8f30a807f45f614c2ff96463a06faea
data/.idea/testmgr.iml CHANGED
@@ -11,16 +11,8 @@
11
11
  </component>
12
12
  <component name="NewModuleRootManager">
13
13
  <content url="file://$MODULE_DIR$" />
14
- <orderEntry type="inheritedJdk" />
14
+ <orderEntry type="jdk" jdkName="RVM: ruby-2.3.0 [global]" jdkType="RUBY_SDK" />
15
15
  <orderEntry type="sourceFolder" forTests="false" />
16
- <orderEntry type="library" scope="PROVIDED" name="bundler (v1.11.2, ruby-2.0.0-p481) [gem]" level="application" />
17
- <orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.2.5, ruby-2.0.0-p481) [gem]" level="application" />
18
- <orderEntry type="library" scope="PROVIDED" name="json (v1.7.7, ruby-2.0.0-p481) [gem]" level="application" />
19
- <orderEntry type="library" scope="PROVIDED" name="rake (v10.5.0, ruby-2.0.0-p481) [gem]" level="application" />
20
- <orderEntry type="library" scope="PROVIDED" name="rspec (v3.4.0, ruby-2.0.0-p481) [gem]" level="application" />
21
- <orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.4.0, ruby-2.0.0-p481) [gem]" level="application" />
22
- <orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.4.0, ruby-2.0.0-p481) [gem]" level="application" />
23
- <orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.4.0, ruby-2.0.0-p481) [gem]" level="application" />
24
- <orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.4.0, ruby-2.0.0-p481) [gem]" level="application" />
16
+ <orderEntry type="library" scope="PROVIDED" name="rake (v10.4.2, RVM: ruby-2.3.0 [global]) [gem]" level="application" />
25
17
  </component>
26
18
  </module>
@@ -13,6 +13,7 @@ class TestReport
13
13
  attr_accessor :completed
14
14
  attr_accessor :description
15
15
  attr_accessor :environment_under_test
16
+ attr_accessor :host
16
17
  attr_accessor :tStart, :tEnd
17
18
  attr_accessor :test_list
18
19
  attr_accessor :browser_under_test
@@ -29,6 +30,7 @@ class TestReport
29
30
 
30
31
  def initialize()
31
32
  @verbose=false
33
+ @host=""
32
34
  @description=""
33
35
  @current_rec = { :req => DEFAULT_REQ, :tc => DEFAULT_REQ}
34
36
  @test_list = []
@@ -186,6 +188,14 @@ class TestReport
186
188
  @data_under_test
187
189
  end
188
190
 
191
+
192
+ def getHost()
193
+ @host
194
+ end
195
+ def setHost(u)
196
+ @host=u
197
+ end
198
+
189
199
  # Environments
190
200
  # => :qa
191
201
  # => :cert
@@ -214,7 +224,7 @@ class TestReport
214
224
 
215
225
  def setBrowserUnderTest(bType=:firefox)
216
226
  @browser_under_test=bType
217
- TestUtils.setDefaultBrowser(bType)
227
+ # TestUtils.setDefaultBrowser(bType)
218
228
  end
219
229
 
220
230
  # if the requirement doesn't exist, then add it.
@@ -308,13 +318,17 @@ class TestReport
308
318
  end
309
319
  end
310
320
 
321
+ def _skipped?(metrics)
322
+ metrics[:total] == 0 && metrics[:passed] == 0 && metrics[:failed] == 0
323
+ end
324
+
311
325
  def _passed?(metrics)
312
326
  metrics[:total] > 0 && metrics[:passed] > 0 && metrics[:failed] == 0
313
327
  end
314
328
 
315
329
 
316
330
  def getMetrics()
317
- puts "\n\n== Test Metrics ==\n"
331
+ puts "\n\n== Test Metrics ==\n" if Testmgr::TestReport.instance.verbose
318
332
 
319
333
  asserts_metrics={:passed => 0, :failed => 0, :skipped => 0, :total => 0, :result => nil}
320
334
 
@@ -325,7 +339,7 @@ class TestReport
325
339
  rc=true
326
340
 
327
341
  @requirements.each do |r|
328
- puts "#{r.class.to_s}"
342
+ puts "#{r.class.to_s}" if Testmgr::TestReport.instance.verbose
329
343
 
330
344
  rq_metrics[:total]+=1
331
345
 
@@ -337,7 +351,9 @@ class TestReport
337
351
 
338
352
 
339
353
  tc_metrics[:total]+=r.totalTestCases()
340
- if _passed?(_m)
354
+ if _skipped?(_m)
355
+ tc_metrics[:skipped]+=1
356
+ elsif _passed?(_m)
341
357
  tc_metrics[:passed]+=1
342
358
  else
343
359
  tc_metrics[:failed]+=1
@@ -356,12 +372,18 @@ class TestReport
356
372
 
357
373
  end
358
374
 
359
- rc = rq_metrics[:failed] == 0 && tc_metrics[:failed] && asserts_metrics[:failed]==0
375
+ rc = rq_metrics[:failed] == 0 && tc_metrics[:failed] == 0 && asserts_metrics[:failed]==0
360
376
 
361
377
 
362
378
  asserts_metrics[:result] = _passed?(asserts_metrics)
363
379
 
364
- { :rc => rc, :assertions => asserts_metrics, :testcases => tc_metrics, :requirements => rq_metrics }
380
+ { :rc => rc,
381
+ :host => getHost(),
382
+ :assertions => asserts_metrics,
383
+ :testcases => tc_metrics, :requirements => rq_metrics,
384
+ :device => @browser_under_test.to_s,
385
+ :start => @tStart
386
+ }
365
387
  end
366
388
 
367
389
  def generateReport()
@@ -405,6 +427,8 @@ class TestReport
405
427
  elapsed_time=time_diff_milli(@tStart)
406
428
  puts "Elapsed time : #{elapsed_time.to_s} msec."
407
429
  puts "\n\nT*** Test Result : #{final_result.to_s} ***"
430
+
431
+ final_result
408
432
  end
409
433
 
410
434
  end
@@ -1,3 +1,3 @@
1
1
  module Testmgr
2
- VERSION = "0.3.1.pre"
2
+ VERSION = "0.3.2.pre"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testmgr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1.pre
4
+ version: 0.3.2.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - h20dragon
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-03-24 00:00:00.000000000 Z
11
+ date: 2016-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler