taf 0.1.6 → 0.1.7
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 +4 -4
- data/lib/main.rb +3 -0
- data/lib/report/report_summary.rb +14 -39
- data/lib/utils/create_directories.rb +1 -4
- data/lib/utils/logger.rb +1 -1
- data/lib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46bc41e2b99ad92e8f411e96bce70773f449f3f774e3a757e93b307e8f9563ac
|
4
|
+
data.tar.gz: 24c407eb8d80359e2013f4997ef6863d4cd765d95b9f53bd34e0c6ff4041a490
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b73f36e5ce2b13affc61043aa516ada0f5bac51e8ebd21770b9c863c3a7e46cbb5eb358d3bc1441ced4f3424d9e9ecbe82440a3537353eaa082ecb74748b496c
|
7
|
+
data.tar.gz: 222ab1335896ae7c68dea8462c20e8e0adecd8fe1c4ee7de9c5662b722b1093f4cf6bd82f71e54d93b0ef9a3eb2a8ac8dbd887cee41a2ffbd6749cca90f53bec
|
data/lib/main.rb
CHANGED
@@ -13,18 +13,17 @@ module ReportSummary
|
|
13
13
|
@testStepReportSummary = []
|
14
14
|
# output the test results summary for the current test case
|
15
15
|
def self.test_step_summary(test_file_name, test_file_name_index)
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
@testStepReportSummary[test_file_name_index] = @testStepReportSummary[test_file_name_index].join(' ')
|
16
|
+
@testStepReportSummary[test_file_name_index] = <<~TEXT
|
17
|
+
Test file: #{test_file_name}
|
18
|
+
Browser type: #{$browserType}
|
19
|
+
Browser version: #{Browser.browser_version}
|
20
|
+
Environment: #{$env_type}
|
21
|
+
Started at: #{$test_case_start_time}
|
22
|
+
Finished at: #{$test_case_end_time}
|
23
|
+
There are: #{$testStepPasses} Passes
|
24
|
+
There are: #{$testStepFailures} Failures
|
25
|
+
There are: #{$testStepNotrun} Skipped Tests \n
|
26
|
+
TEXT
|
28
27
|
end
|
29
28
|
|
30
29
|
# output the overall test results summary
|
@@ -34,7 +33,9 @@ module ReportSummary
|
|
34
33
|
MyLog.log.info "Finished processing all test files - executed via test suite: #{$testSuiteFile} by tester: #{$tester}"
|
35
34
|
MyLog.log.info "Overall Test Summary:"
|
36
35
|
@testStepReportSummary.each do |testStepReportSummary|
|
37
|
-
|
36
|
+
testStepReportSummary.each_line do |line|
|
37
|
+
MyLog.log.info(line.strip)
|
38
|
+
end
|
38
39
|
end
|
39
40
|
|
40
41
|
MyLog.log.info "Total Tests started at: #{$test_start_time}"
|
@@ -45,31 +46,5 @@ module ReportSummary
|
|
45
46
|
MyLog.log.info "Total Tests Skipped: #{$totalTestNotrun}".blue
|
46
47
|
$totalTests = [$totalTestPasses, $totalTestFailures, $totalTestNotrun].sum
|
47
48
|
MyLog.log.info "Total Tests: #{$totalTests}\n"
|
48
|
-
|
49
|
-
# output to the suite summary file
|
50
|
-
|
51
|
-
# open the suite summary file for writing if not already open
|
52
|
-
if !File.exist?($testSuiteSummaryFileName) || $testSuiteSummaryFileName.closed?
|
53
|
-
testSuiteSummaryFile = File.open($testSuiteSummaryFileName, 'w')
|
54
|
-
MyLog.log.info"Test Suite Summary file located at:"
|
55
|
-
MyLog.log.info "#{$testSuiteSummaryFileName}\n"
|
56
|
-
elsif MyLog.log.warn "test suite summary file name: #{$testSuiteSummarylFileName} is already open"
|
57
|
-
end
|
58
|
-
|
59
|
-
testSuiteSummaryFile.puts "Finished processing all test files - executed via test suite: #{$testSuiteFile} by tester: #{$tester} \n"
|
60
|
-
testSuiteSummaryFile.puts "\nOverall Test Summary:"
|
61
|
-
@testStepReportSummary.each do |testStepReportSummary|
|
62
|
-
testSuiteSummaryFile.puts testStepReportSummary
|
63
|
-
end
|
64
|
-
testSuiteSummaryFile.puts("\nTotal Tests started at: #{$test_start_time}")
|
65
|
-
testSuiteSummaryFile.puts("Total Tests finished at: #{$test_end_time}")
|
66
|
-
testSuiteSummaryFile.puts('Total Tests duration: ' + TimeDifference.between($test_end_time, $test_start_time).humanize)
|
67
|
-
testSuiteSummaryFile.puts("Total Tests Passed: #{$totalTestPasses}")
|
68
|
-
testSuiteSummaryFile.puts("Total Tests Failed: #{$totalTestFailures}")
|
69
|
-
testSuiteSummaryFile.puts("Total Tests Skipped: #{$totalTestNotrun}")
|
70
|
-
testSuiteSummaryFile.puts("Total Tests: #{$totalTests} \n")
|
71
|
-
|
72
|
-
# if the file is open then close it
|
73
|
-
testSuiteSummaryFile.close unless testSuiteSummaryFile.closed?
|
74
49
|
end
|
75
50
|
end
|
@@ -51,13 +51,10 @@ module CreateDirectories
|
|
51
51
|
screenshot_dir = testid_dir + '/' + 'Screenshots' + '/'
|
52
52
|
Dir.mkdir(screenshot_dir)
|
53
53
|
|
54
|
-
# create absolute paths to the screenshots
|
54
|
+
# create absolute paths to the screenshots and test suite summary directories
|
55
55
|
abs_path_screenshot_dir = File.absolute_path(screenshot_dir)
|
56
56
|
abs_path_run_no_dir = File.absolute_path($runNoDir)
|
57
57
|
|
58
|
-
# the test suite summary file name will be 'suite_summary.txt'
|
59
|
-
$testSuiteSummaryFileName = abs_path_run_no_dir + '/suite_summary.txt'
|
60
|
-
|
61
58
|
# the test suite summary is a XML report generated will be called 'suite_summary.xml'
|
62
59
|
time = Time.new
|
63
60
|
f_date = time.strftime('%d-%b-%Y')
|
data/lib/utils/logger.rb
CHANGED
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: taf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Perrett
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|