taf 0.2.2 → 0.2.3
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/report/junit_report.rb +4 -4
- data/lib/taf_config.rb +0 -1
- data/lib/utils/browser.rb +4 -2
- data/lib/utils/create_directories.rb +5 -13
- 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: dc027375cb1080bd59899a22d3031d94c7c01f290bf038e3405817bd9f5a0917
|
4
|
+
data.tar.gz: c33164d59b1b513d21d151308ea047cb5ae1b9dcb6262c2f8e5d49bc86dbcb15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64ba1aea3db08ae4635daf4bae64fa041edf1f189bcb8aa140ecf2a12d9f896a2225ecfdf6caca83e29a7aa7572e88233dfe7a09461956804c7c98255aa65e73
|
7
|
+
data.tar.gz: 8c70b235958f5bf237e0522526736e71cd0cfd87d757e949e9c650d783a936f132ee8179008614035b7db53fe99c9e6dd0234bbc2c8ed23b96237b961a64fa13
|
data/lib/report/junit_report.rb
CHANGED
@@ -61,16 +61,16 @@ module JunitReport
|
|
61
61
|
# output XML content to console for debug
|
62
62
|
# puts builder.to_xml
|
63
63
|
|
64
|
-
# open the suite summary file for writing if not already open
|
64
|
+
# open the test suite (TS) summary file for writing if not already open
|
65
65
|
if !File.exist?($TestSuiteSummaryXML) || $TestSuiteSummaryXML.closed?
|
66
|
-
|
67
|
-
|
66
|
+
ts_summary_file_xml = File.open($TestSuiteSummaryXML, 'w+')
|
67
|
+
ts_summary_file_xml.write builder.to_xml
|
68
68
|
else
|
69
69
|
MyLog.log.warn 'test suite summary file xml name:' \
|
70
70
|
" #{$TestSuiteSummaryXML} is already open"
|
71
71
|
end
|
72
72
|
|
73
73
|
# if the file is open then close it
|
74
|
-
|
74
|
+
ts_summary_file_xml.close unless ts_summary_file_xml.closed?
|
75
75
|
end
|
76
76
|
end
|
data/lib/taf_config.rb
CHANGED
data/lib/utils/browser.rb
CHANGED
@@ -119,9 +119,11 @@ module Browser
|
|
119
119
|
sc_dir = CreateDirectories.construct_testspecdirs
|
120
120
|
|
121
121
|
sc_file_name = if $currentTestFail
|
122
|
-
"#{sc_dir}/
|
122
|
+
"#{sc_dir}/Test_ID-#{$testId.delete(' ')}"\
|
123
|
+
"_Test_step-#{$test_step}_Failed_#{time}.png"
|
123
124
|
else
|
124
|
-
"#{sc_dir}/
|
125
|
+
"#{sc_dir}/Test_ID-#{$testId.delete(' ')}"\
|
126
|
+
"_Test_step-#{$test_step}_#{time}.png"
|
125
127
|
end
|
126
128
|
|
127
129
|
# Screenshot capture for websites
|
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
# Created on 20 Sept 2017
|
3
4
|
# @author: Andy Perrett
|
4
5
|
#
|
@@ -8,18 +9,13 @@
|
|
8
9
|
# create_directories.rb - Creates folder structures.
|
9
10
|
module CreateDirectories
|
10
11
|
# create the project directories and open the test results file,
|
11
|
-
#
|
12
|
-
# unique filename based upon the testStep.
|
12
|
+
# the screenshot will be placed in a unique filename based upon the testStep.
|
13
13
|
# A single top-level directory named after the Project ID will be used and the
|
14
14
|
# target sub-directories will be created for each run of the test
|
15
15
|
#
|
16
16
|
# ----> Project directory (working directory)
|
17
17
|
#
|
18
18
|
# ------->directory named after the test run ID UUID
|
19
|
-
#
|
20
|
-
# ---------->directory named after test_id
|
21
|
-
#
|
22
|
-
# ------------->directory named 'Screenshots'
|
23
19
|
|
24
20
|
def self.time_now
|
25
21
|
Time.new.strftime('%d-%b-%Y_%H_%M')
|
@@ -29,8 +25,7 @@ module CreateDirectories
|
|
29
25
|
# create top-level directory if it doesn't already exist:
|
30
26
|
# Results/Project_id
|
31
27
|
project_id = $projectId.delete(' ')
|
32
|
-
$project_iddir = File.join('Results', project_id
|
33
|
-
)
|
28
|
+
$project_iddir = File.join('Results', project_id)
|
34
29
|
|
35
30
|
FileUtils.mkdir_p($project_iddir)
|
36
31
|
|
@@ -45,11 +40,8 @@ module CreateDirectories
|
|
45
40
|
|
46
41
|
def self.construct_testspecdirs
|
47
42
|
# create directories for each test spec for screenshots:
|
48
|
-
# Results/Project_id/Run_ID_UUID
|
49
|
-
screenshot_dir = File.join(
|
50
|
-
$project_iddir, "Run_ID_#{$run_uuid}", "#{$testId.delete(' ')}",
|
51
|
-
'Screenshots'
|
52
|
-
)
|
43
|
+
# Results/Project_id/Run_ID_UUID
|
44
|
+
screenshot_dir = File.join($project_iddir, "Run_ID_#{$run_uuid}")
|
53
45
|
|
54
46
|
abs_path_screenshot_dir = File.absolute_path(screenshot_dir)
|
55
47
|
# abs_path_run_no_dir = File.absolute_path(runNoDir)
|
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.2.
|
4
|
+
version: 0.2.3
|
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-03-
|
11
|
+
date: 2019-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|