awetestlib 0.1.13-x86-mingw32 → 0.1.14-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/awetestlib/logging.rb +17 -3
- data/lib/awetestlib/regression/browser.rb +520 -394
- data/lib/awetestlib/regression/drag_and_drop.rb +15 -0
- data/lib/awetestlib/regression/find.rb +322 -290
- data/lib/awetestlib/regression/legacy.rb +3 -35
- data/lib/awetestlib/regression/page_data.rb +27 -26
- data/lib/awetestlib/regression/runner.rb +3 -1
- data/lib/awetestlib/regression/tables.rb +57 -0
- data/lib/awetestlib/regression/user_input.rb +991 -859
- data/lib/awetestlib/regression/utilities.rb +41 -18
- data/lib/awetestlib/regression/validations.rb +392 -419
- data/lib/awetestlib/regression/waits.rb +59 -66
- data/lib/awetestlib/runner.rb +1 -0
- data/lib/awetestlib.rb +1 -1
- data/lib/version.rb +2 -2
- data/test/create_zoho.rb +1 -0
- data/test/create_zoho_account1.rb +2 -0
- data/test/create_zoho_account2.rb +1 -0
- data/test/zoho_util.rb +8 -6
- metadata +4 -4
data/lib/awetestlib/logging.rb
CHANGED
@@ -1,10 +1,20 @@
|
|
1
1
|
module Awetestlib
|
2
2
|
module Logging
|
3
3
|
|
4
|
+
# @deprecated
|
4
5
|
def self.included(mod)
|
5
6
|
# puts "RegressionSupport::Logging extended by #{mod}"
|
6
7
|
end
|
7
8
|
|
9
|
+
# Format log message and write to STDOUT. Write to physical log if indicated.
|
10
|
+
# @private
|
11
|
+
# @param [Fixnum] severity Severity level of message. Use constants DEBUG, INFO, WARN, ERROR, FATAL, or UNKNOWN
|
12
|
+
# @param [String] message The message to be placed in the log.
|
13
|
+
# @param [String, Fixnum] tag Indicates the type of message. Valid string values are 'FAIL' and 'PASS'.
|
14
|
+
# Valid number values are 0 to 9.
|
15
|
+
# @param [Fixnum] lnbr the line number in the calling script
|
16
|
+
# @param [Fixnum] addts Obsolete, no longer used.
|
17
|
+
# @param [String] exception Obsolete, no longer used.
|
8
18
|
def log_message(severity, message, tag = '', lnbr = nil, addts = 1, exception=nil)
|
9
19
|
# caller = get_caller(lnbr, exception)
|
10
20
|
|
@@ -50,6 +60,10 @@ module Logging
|
|
50
60
|
|
51
61
|
#private log_message
|
52
62
|
|
63
|
+
# Translates tag value to corresponding value for +pass+ column in database.
|
64
|
+
# @private
|
65
|
+
# @param [String, Fixnum] tag
|
66
|
+
# @return [String] Single character
|
53
67
|
def pass_code_for(tag)
|
54
68
|
case
|
55
69
|
when tag =~ /PASS/
|
@@ -204,7 +218,7 @@ tags: log, error, fail, reference, tag, report
|
|
204
218
|
@my_failed_count += 1 if @my_failed_count
|
205
219
|
parse_error_references(message, true)
|
206
220
|
@report_class.add_to_report("#{message}" + " [#{get_caller(lnbr)}]","FAILED")
|
207
|
-
log_message(WARN, "#{message}"
|
221
|
+
log_message(WARN, "#{message}", FAIL, lnbr)
|
208
222
|
end
|
209
223
|
|
210
224
|
alias validate_failed_tolog failed_to_log
|
@@ -302,7 +316,7 @@ tags: log, caller, trace, report
|
|
302
316
|
end
|
303
317
|
end
|
304
318
|
logger = ActiveSupport::BufferedLogger.new(logFile)
|
305
|
-
logger.level =
|
319
|
+
logger.level = ActiveSupport::BufferedLogger::DEBUG
|
306
320
|
logger.auto_flushing = (true)
|
307
321
|
logger.add(INFO, "#{logFile}\n#{ENV["OS"]}")
|
308
322
|
logger
|
@@ -408,4 +422,4 @@ tags: error, fail, hits, reference, tag, tallies
|
|
408
422
|
end
|
409
423
|
|
410
424
|
end
|
411
|
-
end
|
425
|
+
end
|