testmgr 0.3.1.pre → 0.3.2.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.idea/testmgr.iml +2 -10
- data/lib/testmgr/base/test_report.rb +30 -6
- data/lib/testmgr/version.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: 30bcfe33a3d3440a6a4e12ffc0d2bc24ad2aaa8f
|
4
|
+
data.tar.gz: a09aa6cd802d14829567ee94673a50ec1bfb866d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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="
|
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="
|
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
|
-
|
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
|
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,
|
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
|
data/lib/testmgr/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2016-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|