Class: TestSteps::Handlers::CheckLogs
- Defined in:
- lib/functions/handlers/check_logs.rb
Instance Method Summary collapse
Methods inherited from Base
#login_button, #login_check, #login_process, #mem_word_check, #open_url_process, perform, #portal_mem_word, register
Instance Method Details
#perform(step_attributes) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/functions/handlers/check_logs.rb', line 8 def perform(step_attributes) text = step_attributes[:testvalue] file = step_attributes[:testvalue2] blog_result = system 'egrep -i ' + text + ' ' + file + ' > ' + output if blog_result == true MyLog.log.info("Data has matched: #{text} in LogFile: #{file}") return true else MyLog.log.warn("Problem finding: #{text} in LogFile: #{file}") return false end end |