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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aec014d38b9b9f9dbe35fe3bc6a2c924a3434ab0eab2a9976bda8741763ee59d
4
- data.tar.gz: bab944778a1ccf2eb1363de7751a8e2d95fb33a0ac69e2eeb80cbdfecca3c214
3
+ metadata.gz: dc027375cb1080bd59899a22d3031d94c7c01f290bf038e3405817bd9f5a0917
4
+ data.tar.gz: c33164d59b1b513d21d151308ea047cb5ae1b9dcb6262c2f8e5d49bc86dbcb15
5
5
  SHA512:
6
- metadata.gz: 2278f72d06eb0fa27a49f3038b5f22ec9ace610cfc73c41b55282f93af1a6212a8c51e110bb27346559e5152b03a7cb4f91e56206d7384917535429fbfd2270b
7
- data.tar.gz: a01563a120ea0c2f49228c62a2a90423ef41238780425d4430704ee44969fe6c43863edc50847095fb2c6fdae18a4b21813b4a0d2e3edb6ee649487bc216e181
6
+ metadata.gz: 64ba1aea3db08ae4635daf4bae64fa041edf1f189bcb8aa140ecf2a12d9f896a2225ecfdf6caca83e29a7aa7572e88233dfe7a09461956804c7c98255aa65e73
7
+ data.tar.gz: 8c70b235958f5bf237e0522526736e71cd0cfd87d757e949e9c650d783a936f132ee8179008614035b7db53fe99c9e6dd0234bbc2c8ed23b96237b961a64fa13
@@ -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
- testSuiteSummaryFile_xml = File.open($TestSuiteSummaryXML, 'w+')
67
- testSuiteSummaryFile_xml.write builder.to_xml
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
- testSuiteSummaryFile_xml.close unless testSuiteSummaryFile_xml.closed?
74
+ ts_summary_file_xml.close unless ts_summary_file_xml.closed?
75
75
  end
76
76
  end
data/lib/taf_config.rb CHANGED
@@ -23,7 +23,6 @@ require 'optparse'
23
23
  require 'fileutils'
24
24
  require 'securerandom'
25
25
 
26
-
27
26
  # list of all the required files
28
27
  require_relative './utils/test_steps'
29
28
  require_relative './report/report'
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}/Test_step-#{$test_step}_Failed_#{time}.png"
122
+ "#{sc_dir}/Test_ID-#{$testId.delete(' ')}"\
123
+ "_Test_step-#{$test_step}_Failed_#{time}.png"
123
124
  else
124
- "#{sc_dir}/Test_step-#{$test_step}_#{time}.png"
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
- # returns the screenshot directory name, the screenshot will be placed in a
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/Test_ID/Screenshots
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
@@ -3,7 +3,7 @@
3
3
  module Taf
4
4
  # This module holds the TAF version information.
5
5
  module Version
6
- STRING = '0.2.2'
6
+ STRING = '0.2.3'
7
7
 
8
8
  MSG = '%<version>s (using Parser %<parser_version>s, running on ' \
9
9
  '%<ruby_engine>s %<ruby_version>s %<ruby_platform>s)'
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.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-25 00:00:00.000000000 Z
11
+ date: 2019-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler