Class: EasyAutomation::Test
- Inherits:
-
Test::Unit::TestCase
- Object
- Test::Unit::TestCase
- EasyAutomation::Test
- Defined in:
- lib/easy_automation/test.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(test_methodname, path = ".") ⇒ Test
constructor
TODO figure out why we need to pass the path from a child class.
-
#setup ⇒ Object
Sets up the environment to run tests, decides whether build a new selenium client or use a global one.
-
#teardown ⇒ Object
Executed after all tests, normally to stop selenium client.
Constructor Details
#initialize(test_methodname, path = ".") ⇒ Test
TODO figure out why we need to pass the path from a child class
16 17 18 19 |
# File 'lib/easy_automation/test.rb', line 16 def initialize(test_methodname, path = ".") @path = path super(test_methodname) end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
12 13 14 |
# File 'lib/easy_automation/test.rb', line 12 def data @data end |
Instance Method Details
#setup ⇒ Object
Sets up the environment to run tests, decides whether build a new selenium client
or use a global one.
27 28 29 30 31 32 |
# File 'lib/easy_automation/test.rb', line 27 def setup Runner.configuration.execute :before, :each_test @webpage = Server.rc.open(Runner.configuration.current_browser, Runner.configuration.url) @data = LoadData::load_test_data(self.class.to_s, @method_name, @path) end |
#teardown ⇒ Object
Executed after all tests, normally to stop selenium client.
37 38 39 40 |
# File 'lib/easy_automation/test.rb', line 37 def teardown @webpage.close Runner.configuration.execute :after, :each_test end |