[Wtr-general] override method. Design problem?
Adrian Rutter
Adrian.Rutter at tnt.com
Tue Jun 6 06:35:44 EDT 2006
Hi,
I have a class for each automated test, and each application window or any
other related group of functionality is in a module.
Here is an example of a test class:
require 'all_libs'
class ST_LTD_6
def run
begin
p "TESTID: #{self.class}", "TEST DESCRIPTION: Change View Type"
start_browser('http://gbahevm07l15:9081/wps/portal')
login('aidy', '12345')
goto_territory_list
search_territory("GREENLAND", "NUUK", :view => 'Past' )
click_search
p "Do a past and set up an end date at least two days before the test
run"
verify_result("WHATEVER")
rescue => e
puts("TEST FAILED:" + e.message + "\n" + e.backtrace.join("\n"))
ensure
log_out
close_window
end
end
end
test=ST_LTD_6.new
test.run
Now the next test I have will we be exactly the same as this on, but on
this method invocation
search_territory("GREENLAND", "NUUK", :view => 'Past' )
which is contained within a module I include, I need to change the
parameters
Something like this
class ST_LTD_7 < ST_LTD_6
search_territory("GREENLAND", "NUUK", :stream=> 'Sales' )
end
Could someone please point me in the right direction?
Thank You
Aidy
---------------------------------------------------------------------------------------------------------------
This message and any attachment are confidential and may be privileged or otherwise protected from disclosure.
If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system.
If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person.
---------------------------------------------------------------------------------------------------------------
More information about the Wtr-general
mailing list