taft 0.1.0 → 0.2.0
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/README.md +9 -3
- data/examples/ruby/rs/framework/red_sky/api_helpers/general.rb +140 -0
- data/examples/ruby/rs/framework/red_sky/api_helpers/rest.rb +249 -0
- data/examples/ruby/rs/framework/red_sky/ui_helpers/ui_general.rb +36 -0
- data/examples/ruby/rs/framework/red_sky/watir/custom/all.rb +4 -0
- data/examples/ruby/rs/framework/red_sky/watir/custom/rs_custom.rb +32 -0
- data/examples/ruby/rs/framework/red_sky/watir/flows/flow_objects.rb +466 -0
- data/examples/ruby/rs/framework/red_sky/watir/flows/rs_flow_names.rb +15 -0
- data/examples/ruby/rs/framework/red_sky/watir/flows/rs_flows.rb +117 -0
- data/examples/ruby/rs/framework/red_sky/watir/pages/page_objects.rb +166 -0
- data/examples/ruby/rs/framework/red_sky/watir/pages/rs_pages.rb +68 -0
- data/examples/ruby/rs/framework/red_sky.rb +12 -0
- data/examples/ruby/rs/lib/config/red_sky_config.rb +27 -0
- data/examples/ruby/rs/lib/config/runtime_constants.rb +20 -0
- data/examples/ruby/rs/lib/red_sky_test_case.rb +218 -0
- data/examples/ruby/rs/tests/v1/tc_r001_01_an_example_test.rb +112 -0
- data/examples/ruby/rs/tests/v1/tc_r001_01_google_search.rb +64 -0
- data/lib/taft_files/framework/zznamezz/api_helpers/general.rb +11 -11
- data/lib/taft_files/framework/zznamezz/ui_helpers/ui_general.rb +26 -0
- data/lib/taft_files/framework/zznamezz/watir/custom/all.rb +4 -0
- data/lib/taft_files/framework/zznamezz/watir/custom/xxabbrevxx_custom.rb +32 -0
- data/lib/taft_files/framework/zznamezz/watir/flows/flow_objects.rb +466 -0
- data/lib/taft_files/framework/zznamezz/watir/flows/xxabbrevxx_flow_names.rb +15 -0
- data/lib/taft_files/framework/zznamezz/watir/flows/xxabbrevxx_flows.rb +117 -0
- data/lib/taft_files/framework/zznamezz/watir/pages/page_objects.rb +166 -0
- data/lib/taft_files/framework/zznamezz/watir/pages/xxabbrevxx_pages.rb +101 -0
- data/lib/taft_files/framework/zznamezz.rb +4 -0
- data/lib/taft_files/lib/config/runtime_constants.rb +5 -1
- data/lib/taft_files/lib/config/zznamezz_config.rb +7 -2
- data/lib/taft_files/lib/zznamezz_test_case.rb +43 -42
- data/lib/taft_files/tests/v1/tc_r001_01_an_example_test.rb +1 -1
- data/taft.gemspec +4 -4
- metadata +28 -5
@@ -0,0 +1,166 @@
|
|
1
|
+
# Base class that every defined page will inherit from
|
2
|
+
class Page
|
3
|
+
|
4
|
+
attr_accessor :name, :displayed_field, :displayed_value
|
5
|
+
attr_accessor :browser
|
6
|
+
attr_accessor :field_parameters_array # stores parameters of each field added to the page
|
7
|
+
|
8
|
+
# Name : the name of this page, e.g. rsHomepage
|
9
|
+
# Field : the field used to determine if the page is displayed. More precisely,
|
10
|
+
# the name of the method that accesses the field. E.g. if the page has a field called 'page_title'
|
11
|
+
# defined, then its accessor method 'page_title_field' will have been generated .
|
12
|
+
# If the displayed? check is against an expected value, specify the field name corresponding to
|
13
|
+
# the read-method (e.g. page_title), and specify the value (String or Regexp).
|
14
|
+
# If the displayed? check is for a field to exist, specify the field's accessor method name
|
15
|
+
# (e.g. page_title_field), and keep value nil.
|
16
|
+
def initialize(name, field, value = nil)
|
17
|
+
@name = name
|
18
|
+
@displayed_field = field
|
19
|
+
@displayed_value = value
|
20
|
+
@field_parameters_array = []
|
21
|
+
end
|
22
|
+
|
23
|
+
def displayed?(wait = true)
|
24
|
+
displayed = false
|
25
|
+
puts "in displayed? for page #{@name}"
|
26
|
+
if wait
|
27
|
+
puts "will wait for page to be loaded"
|
28
|
+
wait_until_displayed
|
29
|
+
end
|
30
|
+
|
31
|
+
puts "about to send to #{@displayed_field.to_sym.inspect}"
|
32
|
+
begin
|
33
|
+
field_or_value = self.send(@displayed_field.to_sym)
|
34
|
+
rescue Watir::Exception::UnknownObjectException
|
35
|
+
# cannot find the field on the page
|
36
|
+
# do nothing, displayed will stay false
|
37
|
+
rescue Selenium::WebDriver::Error::StaleElementReferenceError
|
38
|
+
# TODO : fix! wait then call displayed? again?
|
39
|
+
puts "hit StaleElementReferenceError for page #{@name}"
|
40
|
+
end
|
41
|
+
|
42
|
+
puts "field_or_value retrieved is of class #{field_or_value.class}"
|
43
|
+
p field_or_value
|
44
|
+
if @displayed_value == nil
|
45
|
+
displayed = true if field_or_value.exists?
|
46
|
+
else
|
47
|
+
if @displayed_value.class == Regexp
|
48
|
+
displayed = true if field_or_value =~ @displayed_value
|
49
|
+
else
|
50
|
+
displayed = true if field_or_value == @displayed_value
|
51
|
+
end
|
52
|
+
end
|
53
|
+
displayed
|
54
|
+
end
|
55
|
+
|
56
|
+
# Method to wait for the page to be displayed, up to <timeout> seconds
|
57
|
+
# Returns displayed status (true/false)
|
58
|
+
def wait_until_displayed(timeout = 5)
|
59
|
+
max = timeout * 10
|
60
|
+
count = 0
|
61
|
+
displayed = false
|
62
|
+
while count < max
|
63
|
+
displayed = displayed?(false)
|
64
|
+
break if displayed
|
65
|
+
sleep 0.2
|
66
|
+
count += 2
|
67
|
+
end
|
68
|
+
displayed
|
69
|
+
end
|
70
|
+
|
71
|
+
# Defines methods to access the field of specified type, by specified key & value
|
72
|
+
def add_field(name, type, key, value)
|
73
|
+
field_parameters_array << [name, type, key, value]
|
74
|
+
add_field_using_constructor_class(name, type, key, value)
|
75
|
+
end
|
76
|
+
|
77
|
+
# Add to self all fields that were defined on page_object
|
78
|
+
# E.g. the supplied page_object represents part of a panel/page that is common to several pages
|
79
|
+
def add_page(page_object)
|
80
|
+
page_object.field_parameters_array.each do |field_parameters|
|
81
|
+
add_field(field_parameters[0], field_parameters[1], field_parameters[2], field_parameters[3])
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
# Defines methods to access the field of specified type, by specified key & value
|
86
|
+
def add_field_using_constructor_class(name, type, key, value)
|
87
|
+
PageFieldConstructor.add_fields(self, name, type, key, value)
|
88
|
+
end
|
89
|
+
|
90
|
+
end # end Page
|
91
|
+
|
92
|
+
class PageFieldConstructor
|
93
|
+
|
94
|
+
# Defines methods to access the field of specified type, by specified key & value
|
95
|
+
def PageFieldConstructor.add_fields(page_object, name, type, key, value)
|
96
|
+
|
97
|
+
# Fields cannot have the following names : name
|
98
|
+
raise "Field on page #{page_object.name} with name of #{name} is not allowed" if ZZnamezzConfig::DISALLOWED_FIELD_NAMES.include?(name)
|
99
|
+
|
100
|
+
case type
|
101
|
+
when :button
|
102
|
+
real_type = :input
|
103
|
+
else
|
104
|
+
real_type = type
|
105
|
+
end
|
106
|
+
|
107
|
+
# add accessor to field
|
108
|
+
s = <<-METHOD
|
109
|
+
def page_object.#{name}_field
|
110
|
+
# puts "in #{name} method"
|
111
|
+
@browser.#{real_type}(#{key.inspect} => "#{value}")
|
112
|
+
end
|
113
|
+
METHOD
|
114
|
+
# page_object.class.module_eval(s) # do not do this - want to add methods (field) to the object, not the class!
|
115
|
+
eval(s)
|
116
|
+
|
117
|
+
case type
|
118
|
+
when :text_field
|
119
|
+
add_read_method(page_object, name)
|
120
|
+
add_write_method(page_object, name)
|
121
|
+
when :button
|
122
|
+
add_click_method(page_object, name)
|
123
|
+
when :link
|
124
|
+
add_read_method(page_object, name)
|
125
|
+
add_click_method(page_object, name)
|
126
|
+
else
|
127
|
+
add_read_method(page_object, name)
|
128
|
+
end
|
129
|
+
|
130
|
+
end
|
131
|
+
|
132
|
+
def PageFieldConstructor.add_read_method(page_object, name)
|
133
|
+
s = <<-READ
|
134
|
+
def page_object.#{name}
|
135
|
+
# puts "in #{name} read method"
|
136
|
+
#{name}_field.text # value
|
137
|
+
end
|
138
|
+
READ
|
139
|
+
# page_object.class.module_eval(s) # do not do this - want to add methods (field) to the object, not the class!
|
140
|
+
eval(s)
|
141
|
+
end
|
142
|
+
|
143
|
+
def PageFieldConstructor.add_write_method(page_object, name)
|
144
|
+
s = <<-WRITE
|
145
|
+
def page_object.#{name}=(v)
|
146
|
+
# puts "in #{name} write method"
|
147
|
+
#{name}_field.set(v)
|
148
|
+
end
|
149
|
+
WRITE
|
150
|
+
# page_object.class.module_eval(s) # do not do this - want to add methods (field) to the object, not the class!
|
151
|
+
eval(s)
|
152
|
+
end
|
153
|
+
|
154
|
+
def PageFieldConstructor.add_click_method(page_object, name)
|
155
|
+
s = <<-CLICK
|
156
|
+
def page_object.click_#{name}
|
157
|
+
# puts "in #{name} click method"
|
158
|
+
#{name}_field.click
|
159
|
+
end
|
160
|
+
CLICK
|
161
|
+
# page_object.class.module_eval(s) # do not do this - want to add methods (field) to the object, not the class!
|
162
|
+
eval(s)
|
163
|
+
end
|
164
|
+
|
165
|
+
end
|
166
|
+
|
@@ -0,0 +1,101 @@
|
|
1
|
+
# Class that holds definitions for all of the pages in ZZnamezz
|
2
|
+
# These can be used to determine if the browser is currently displaying that page
|
3
|
+
#
|
4
|
+
# Field types :
|
5
|
+
# Use :text_field instead of :input if it's a text-field
|
6
|
+
# Use :button instead of :input if it's a button
|
7
|
+
# Otherwise, use the actual HTML element type
|
8
|
+
|
9
|
+
require_relative 'page_objects'
|
10
|
+
|
11
|
+
class XXabbrevupperxxPages
|
12
|
+
|
13
|
+
@@browser = nil
|
14
|
+
@@pages = [] # an array of Page objects
|
15
|
+
@@page_names = []
|
16
|
+
|
17
|
+
def self.make_pages(browser)
|
18
|
+
@@browser = browser
|
19
|
+
|
20
|
+
# Nav bar
|
21
|
+
# Not a real page, but is a panel common to many pages
|
22
|
+
# Don't add_page(nav_bar); do page.add_page(nav_bar)
|
23
|
+
nav_bar = Page.new("xxabbrevxxNavBar", "page_title", "Welcome to ZZnamezz")
|
24
|
+
|
25
|
+
nav_bar.add_field("goto_homepage", :link, :id, "xxabbrevxx_home_header_link")
|
26
|
+
nav_bar.add_field("page_title", :h1, :id, "page_title")
|
27
|
+
|
28
|
+
# Homepage
|
29
|
+
page = Page.new("xxabbrevxxHomepage", "page_title", "Welcome to ZZnamezz")
|
30
|
+
|
31
|
+
page.add_field("all_users", :link, :id, "users_header_link")
|
32
|
+
page.add_page(nav_bar)
|
33
|
+
|
34
|
+
self.add_page(page)
|
35
|
+
|
36
|
+
|
37
|
+
# Users
|
38
|
+
page = Page.new("xxabbrevxxUsers", "page_title", "Listing users")
|
39
|
+
|
40
|
+
page.add_field("users", :table, :id, "view_users_table")
|
41
|
+
page.add_field("new_user", :link, :id, "new_user_link")
|
42
|
+
page.add_page(nav_bar)
|
43
|
+
|
44
|
+
self.add_page(page)
|
45
|
+
|
46
|
+
# Create User
|
47
|
+
page = Page.new("xxabbrevxxCreateUser", "page_title", "New user")
|
48
|
+
|
49
|
+
page.add_field("user_name", :text_field, :id, "user_name")
|
50
|
+
page.add_field("role", :list, :id, "user_role")
|
51
|
+
page.add_field("save", :button, :id, "save")
|
52
|
+
page.add_field("back", :link, :id, "back_link")
|
53
|
+
page.add_page(nav_bar)
|
54
|
+
|
55
|
+
self.add_page(page)
|
56
|
+
|
57
|
+
# View User
|
58
|
+
page = Page.new("xxabbrevxxViewUser", "page_title", /^User/)
|
59
|
+
|
60
|
+
page.add_field("project", :div, :id, "name")
|
61
|
+
page.add_field("version", :div, :id, "roles")
|
62
|
+
page.add_field("edit", :link, :id, "edit_link")
|
63
|
+
page.add_field("back", :link, :id, "back_link")
|
64
|
+
page.add_page(nav_bar)
|
65
|
+
|
66
|
+
self.add_page(page)
|
67
|
+
|
68
|
+
end
|
69
|
+
|
70
|
+
##################################################################################################
|
71
|
+
|
72
|
+
|
73
|
+
def self.add_page(page)
|
74
|
+
page.browser = @@browser # set the browser object for each page
|
75
|
+
# TODO have only one browser object (here in XXabbrevupperxxPages), and have each page know how to find it, instead of taking
|
76
|
+
# their own copy of the object
|
77
|
+
@@pages << page
|
78
|
+
@@page_names << page.name
|
79
|
+
end
|
80
|
+
|
81
|
+
# Outputs info on the pages currently stored
|
82
|
+
def self.info
|
83
|
+
s = ""
|
84
|
+
s += "#{@@pages.size} pages defined. Names :"
|
85
|
+
@@page_names.each {|f| s += "\n#{f}" }
|
86
|
+
s
|
87
|
+
end
|
88
|
+
|
89
|
+
# Will convert name to a string
|
90
|
+
def self.page_known?(name)
|
91
|
+
@@page_names.include?(name.to_s)
|
92
|
+
end
|
93
|
+
|
94
|
+
# Retrieves the specific page; raises if it cannot be found
|
95
|
+
# Will convert name to a string
|
96
|
+
def self.find(name)
|
97
|
+
raise "Could not locate page '#{name}'" unless self.page_known?(name)
|
98
|
+
@@pages[@@page_names.index(name.to_s)]
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
@@ -1,6 +1,6 @@
|
|
1
1
|
|
2
2
|
# This class holds parameters that may frequently change between test runs, e.g the test environment
|
3
|
-
|
3
|
+
module RuntimeConstants
|
4
4
|
|
5
5
|
$TEST_ENV = :test_1
|
6
6
|
|
@@ -10,6 +10,10 @@ class RuntimeConstants
|
|
10
10
|
MAKE_ERROR_SCREENSHOTS = true
|
11
11
|
ERROR_SCREENSHOT_LOCATION = "screenshots"
|
12
12
|
|
13
|
+
WRITE_CI_REPORTS = false
|
14
|
+
|
15
|
+
BROWSER = :chrome
|
16
|
+
|
13
17
|
RESULTS_CSV = "results.csv"
|
14
18
|
|
15
19
|
end
|
@@ -6,12 +6,13 @@ class ZZnamezzConfig
|
|
6
6
|
include RuntimeConstants
|
7
7
|
|
8
8
|
CERTIFICATE_DIR = "certs"
|
9
|
+
CERTIFICATE_POPUP_TIMEOUT = 15
|
9
10
|
|
10
11
|
API_VERSION = "latest"
|
11
12
|
|
12
13
|
SERVERS = {
|
13
|
-
:test_1 => {:zznamezz_url
|
14
|
-
:ref_1 => {:zznamezz_url
|
14
|
+
:test_1 => {:zznamezz_url => "https://"},
|
15
|
+
:ref_1 => {:zznamezz_url => "https://"},
|
15
16
|
}
|
16
17
|
|
17
18
|
SERVER = SERVERS[$TEST_ENV]
|
@@ -19,4 +20,8 @@ class ZZnamezzConfig
|
|
19
20
|
|
20
21
|
PASSED = "Passed"
|
21
22
|
FAILED = "Failed"
|
23
|
+
|
24
|
+
DISALLOWED_FIELD_NAMES = ["name"]
|
25
|
+
|
26
|
+
ALL_USER_ROLES = ["all"]
|
22
27
|
end
|
@@ -5,7 +5,7 @@
|
|
5
5
|
# should implement their own methods and call super within them to trigger these common
|
6
6
|
# setup/teardown methods at the right time.
|
7
7
|
|
8
|
-
$LOAD_PATH.unshift
|
8
|
+
$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/.."))
|
9
9
|
|
10
10
|
gem 'test-unit'
|
11
11
|
require 'test/unit'
|
@@ -13,9 +13,10 @@ require 'tmpdir'
|
|
13
13
|
require 'time'
|
14
14
|
require 'fileutils'
|
15
15
|
require 'timeout'
|
16
|
+
require 'watir'
|
16
17
|
|
17
18
|
# Config
|
18
|
-
require 'config/zznamezz_config'
|
19
|
+
require 'config/zznamezz_config.rb'
|
19
20
|
|
20
21
|
# Helpers
|
21
22
|
require 'framework/zznamezz.rb'
|
@@ -33,8 +34,6 @@ end
|
|
33
34
|
|
34
35
|
module ZZnamezzTestCase
|
35
36
|
|
36
|
-
include ZZnamezz
|
37
|
-
|
38
37
|
attr_accessor :browser_has_been_opened
|
39
38
|
|
40
39
|
# optional field
|
@@ -44,86 +43,87 @@ module ZZnamezzTestCase
|
|
44
43
|
# method (if they have any relevent failure notes).
|
45
44
|
attr_accessor :failure_notes
|
46
45
|
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
46
|
+
# E.g. calling homepage.displayed? from a test script :
|
47
|
+
# Test cannot see homepage so its call is routed through method_missing
|
48
|
+
# If method_missing returns an instance of the class, .displayed? can be called on it (seamlessly)
|
49
|
+
# At present this will happen for every call to a page from a test script
|
50
|
+
def method_missing(name, *args, &block)
|
51
|
+
#puts "ZZnamezzTestCase method_missing called; name = #{name.inspect}; #{name.class}"
|
52
|
+
|
53
|
+
case name.to_s
|
54
|
+
when /^browser$/
|
55
|
+
browser
|
56
|
+
when /^xxabbrevxx/i
|
57
|
+
RSPages.find(name.to_s) # return the page so that the test can use it
|
56
58
|
else
|
57
59
|
super
|
58
60
|
end
|
59
61
|
end
|
60
62
|
|
61
|
-
|
62
63
|
if $WRITE_RESULTS # supplied from invokation
|
63
64
|
WRITE_RESULTS = true
|
64
65
|
else
|
65
66
|
WRITE_RESULTS = false
|
66
67
|
end
|
67
68
|
|
68
|
-
# Close the current browser and log in again
|
69
|
-
def re_login
|
70
|
-
browser.close
|
71
|
-
|
72
|
-
new_browser_on_login_page
|
73
|
-
# Reinitialise the contexd and @help
|
74
|
-
reinitialisexxabbrevupperxxContext(browser)
|
75
|
-
end
|
76
|
-
|
77
69
|
# Connect to yyrawnameyy and reinitialise the context, etc.
|
78
70
|
def xxabbrevxx_login(url = ZZnamezzConfig::SERVER[:zznamezz_url])
|
79
|
-
|
80
|
-
|
81
|
-
reinitialisexxabbrevupperxxContext(browser)
|
82
|
-
end
|
83
|
-
|
84
|
-
# Reinitialise xxabbrevupperxx context only
|
85
|
-
def reinitialisexxabbrevupperxxContext(new_browser)
|
86
|
-
@xxabbrevxx_context = ZZnamezz::Context.new(new_browser)
|
87
|
-
@help = xxabbrevupperxxHelper.new(@xxabbrevxx_context)
|
71
|
+
browser = @help.new_browser_at_url(url)
|
72
|
+
load_pages(browser)
|
88
73
|
end
|
89
74
|
|
90
|
-
|
91
|
-
|
92
|
-
|
75
|
+
def load_pages(browser)
|
76
|
+
xxabbrevupperxxPages.make_pages(browser) # cannot have pages without a browser object
|
77
|
+
$browsers << browser
|
78
|
+
@browser_has_been_opened = true
|
93
79
|
end
|
94
80
|
|
95
81
|
# Close the current browser
|
96
82
|
def close_browser
|
97
|
-
|
83
|
+
browser.close
|
98
84
|
end
|
99
85
|
|
100
86
|
def close(browser)
|
101
87
|
if browser.exists? && ((ZZnamezzConfig::CLOSE_BROWSER_AFTER_TEST && passed?) || ZZnamezzConfig::FORCE_CLOSE_BROWSER_AFTER_TEST)
|
102
88
|
browser.close
|
103
89
|
$browsers.delete_at($current_browser_position - 1) # array indexing
|
104
|
-
|
90
|
+
browser = $browsers[-1] # set browser to the last one that is still in the array
|
105
91
|
end
|
106
92
|
end
|
107
93
|
|
108
94
|
def close_all_browsers
|
109
95
|
if (ZZnamezzConfig::CLOSE_BROWSER_AFTER_TEST && passed?) || ZZnamezzConfig::FORCE_CLOSE_BROWSER_AFTER_TEST
|
110
96
|
until $browsers.empty?
|
111
|
-
|
97
|
+
browser = $browsers.shift
|
112
98
|
browser.close
|
113
99
|
end
|
114
100
|
end
|
115
101
|
end
|
116
102
|
|
103
|
+
|
104
|
+
@@browser = nil
|
105
|
+
|
106
|
+
def browser
|
107
|
+
@@browser
|
108
|
+
end
|
109
|
+
|
110
|
+
def browser=(b)
|
111
|
+
@@browser = b
|
112
|
+
end
|
113
|
+
alias set_browser browser= # note : calls of "browser = " do not work, calls of "browser=" do
|
114
|
+
|
117
115
|
# Ensure that every test (that wants one) has a browser that is already logged in to the system
|
118
116
|
def setup
|
119
117
|
|
118
|
+
@help = xxabbrevupperxxHelper.new
|
119
|
+
|
120
120
|
Watir.always_locate = true # default is true; setting to false speeds up Watir to a degree
|
121
121
|
|
122
122
|
# Get start time for later output in results
|
123
123
|
@test_start_time = Time.now
|
124
124
|
|
125
125
|
# Get the directory that the specific test lives in, so that it can be included in the results file
|
126
|
-
@test_file_dir = @test_file.split(File::SEPARATOR)[-2]
|
126
|
+
@test_file_dir = @test_file.split(File::SEPARATOR)[-2] if @test_file
|
127
127
|
|
128
128
|
# Select default certificate if none is configured
|
129
129
|
@certificate ||= :regular
|
@@ -138,7 +138,6 @@ module ZZnamezzTestCase
|
|
138
138
|
xxabbrevxx_login
|
139
139
|
elsif (@initialBrowser == :none || @initialBrowser == nil)
|
140
140
|
browser = nil
|
141
|
-
reinitialisexxabbrevupperxxContext(browser)
|
142
141
|
end
|
143
142
|
|
144
143
|
end # end setup
|
@@ -179,8 +178,7 @@ module ZZnamezzTestCase
|
|
179
178
|
puts "Notes : #{notes}"
|
180
179
|
end # end unless passed?
|
181
180
|
|
182
|
-
|
183
|
-
|
181
|
+
|
184
182
|
# Write to the results file
|
185
183
|
begin
|
186
184
|
File.open(ZZnamezzConfig::RESULTS_CSV, "a") do |f|
|
@@ -192,6 +190,9 @@ module ZZnamezzTestCase
|
|
192
190
|
puts "Had to rescue from writing results to file #{ZZnamezzConfig::RESULTS_CSV}"
|
193
191
|
end
|
194
192
|
end # end if WRITE_RESULTS
|
193
|
+
|
194
|
+
close_all_browsers
|
195
|
+
|
195
196
|
rescue Timeout::Error => t_error
|
196
197
|
puts "Timeout::Error :"
|
197
198
|
puts t_error
|
data/taft.gemspec
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'taft'
|
3
|
-
s.version = '0.
|
3
|
+
s.version = '0.2.0'
|
4
4
|
s.licenses = ['MIT']
|
5
|
-
s.summary = "Test Automation Framework Template"
|
6
|
-
s.description = "
|
5
|
+
s.summary = "Test Automation Framework Template (TAFT)"
|
6
|
+
s.description = "TAFT will deploy/install a skeleton code framework for the automated testing of applications with APIs and/or web-UIs"
|
7
7
|
s.authors = ["Richard Morrisby"]
|
8
8
|
s.email = 'rmorrisby@gmail.com'
|
9
9
|
s.files = ["lib/taft.rb"]
|
10
10
|
s.homepage = 'https://rubygems.org/gems/taft'
|
11
|
-
s.required_ruby_version = '>=
|
11
|
+
s.required_ruby_version = '>=2.6'
|
12
12
|
s.files = Dir['**/**']
|
13
13
|
s.test_files = Dir["test/test*.rb"]
|
14
14
|
end
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: taft
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Morrisby
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description:
|
13
|
+
description: TAFT will deploy/install a skeleton code framework for the automated
|
14
14
|
testing of applications with APIs and/or web-UIs
|
15
15
|
email: rmorrisby@gmail.com
|
16
16
|
executables: []
|
@@ -20,11 +20,34 @@ files:
|
|
20
20
|
- LICENCE.txt
|
21
21
|
- README.md
|
22
22
|
- build.rb
|
23
|
+
- examples/ruby/rs/framework/red_sky.rb
|
24
|
+
- examples/ruby/rs/framework/red_sky/api_helpers/general.rb
|
25
|
+
- examples/ruby/rs/framework/red_sky/api_helpers/rest.rb
|
26
|
+
- examples/ruby/rs/framework/red_sky/ui_helpers/ui_general.rb
|
27
|
+
- examples/ruby/rs/framework/red_sky/watir/custom/all.rb
|
28
|
+
- examples/ruby/rs/framework/red_sky/watir/custom/rs_custom.rb
|
29
|
+
- examples/ruby/rs/framework/red_sky/watir/flows/flow_objects.rb
|
30
|
+
- examples/ruby/rs/framework/red_sky/watir/flows/rs_flow_names.rb
|
31
|
+
- examples/ruby/rs/framework/red_sky/watir/flows/rs_flows.rb
|
32
|
+
- examples/ruby/rs/framework/red_sky/watir/pages/page_objects.rb
|
33
|
+
- examples/ruby/rs/framework/red_sky/watir/pages/rs_pages.rb
|
34
|
+
- examples/ruby/rs/lib/config/red_sky_config.rb
|
35
|
+
- examples/ruby/rs/lib/config/runtime_constants.rb
|
36
|
+
- examples/ruby/rs/lib/red_sky_test_case.rb
|
37
|
+
- examples/ruby/rs/tests/v1/tc_r001_01_an_example_test.rb
|
38
|
+
- examples/ruby/rs/tests/v1/tc_r001_01_google_search.rb
|
23
39
|
- lib/taft.rb
|
24
40
|
- lib/taft_files/framework/zznamezz.rb
|
25
41
|
- lib/taft_files/framework/zznamezz/api_helpers/general.rb
|
26
42
|
- lib/taft_files/framework/zznamezz/api_helpers/rest.rb
|
27
43
|
- lib/taft_files/framework/zznamezz/ui_helpers/ui_general.rb
|
44
|
+
- lib/taft_files/framework/zznamezz/watir/custom/all.rb
|
45
|
+
- lib/taft_files/framework/zznamezz/watir/custom/xxabbrevxx_custom.rb
|
46
|
+
- lib/taft_files/framework/zznamezz/watir/flows/flow_objects.rb
|
47
|
+
- lib/taft_files/framework/zznamezz/watir/flows/xxabbrevxx_flow_names.rb
|
48
|
+
- lib/taft_files/framework/zznamezz/watir/flows/xxabbrevxx_flows.rb
|
49
|
+
- lib/taft_files/framework/zznamezz/watir/pages/page_objects.rb
|
50
|
+
- lib/taft_files/framework/zznamezz/watir/pages/xxabbrevxx_pages.rb
|
28
51
|
- lib/taft_files/lib/config/runtime_constants.rb
|
29
52
|
- lib/taft_files/lib/config/zznamezz_config.rb
|
30
53
|
- lib/taft_files/lib/zznamezz_test_case.rb
|
@@ -43,7 +66,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
43
66
|
requirements:
|
44
67
|
- - ">="
|
45
68
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
69
|
+
version: '2.6'
|
47
70
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
48
71
|
requirements:
|
49
72
|
- - ">="
|
@@ -53,6 +76,6 @@ requirements: []
|
|
53
76
|
rubygems_version: 3.0.3
|
54
77
|
signing_key:
|
55
78
|
specification_version: 4
|
56
|
-
summary: Test Automation Framework Template
|
79
|
+
summary: Test Automation Framework Template (TAFT)
|
57
80
|
test_files:
|
58
81
|
- test/test_example.rb
|