Skip to main content

TestEvolve

The TestEvolve object is available globally in your Test Evolve project and includes access to drivers and test run information.

tip

TE is an alias for TestEvolve. For example TE.browser will behave the same way as TestEvolve.browser.

Browser

TestEvolve.browser

If you have configured test_types in config.yml to include browser, TestEvolve.browser will return the Watir::Browser instance that has been created with the configuration specified in browser.yml.

If you have not included browser as a test type in config.yml, TestEvolve.browser will return a TestEvolve::UninitialisedBrowser instance and methods called on it will raise an exception as no browser has been created.

info

Further documentation on how to use the Test Evolve browser is available here.

Mobile App

TestEvolve.mobile_app

If you have configured test_types in config.yml to include mobile_app, TestEvolve.mobile_app will return the Selenium Driver instance that has been created with the configuration specified in mobile_app.yml.

If you have not included mobile_app as a test type in config.yml, TestEvolve.browser will return a TestEvolve::UninitialisedMobileAppDriver instance and methods called on it will raise an exception as no driver has been created.

info

Further documentation on how to use the Test Evolve mobile app driver is available here.

Desktop App

TestEvolve.desktop_app

If you have configured test_types in config.yml to include desktop_app, TestEvolve.desktop_app will allow you to automate items on the screen based on the configuration specified in desktop_app.yml.

If you have not included desktop_app as a test type in config.yml, TestEvolve.desktop_app will return a TestEvolve::UninitialisedDesktopAppDriver instance and methods called on it will raise an exception as no driver has been created.

info

Further documentation on how to use the Test Evolve desktop app driver is available here.

Environment

TestEvolve.environment

In config.yml you will have specified an environment, which relates to a section in the environments.yml. TestEvolve.environment returns the parsed configuration from the environments.yml for your specified environment.

Example usage:

environments.yml
prod:
url: testevolve.com
qa1:
url: qa.testevolve.com
config.yml
environment: qa1
TestEvolve.environment['url']
> "qa.testevolve.com"

Log

Output information about your running tests to the console from anywhere in your code.

TestEvolve.log

Example usage:

TestEvolve.log.info 'This test is going very well'
TestEvolve.log.error 'This test is going very badly'

Test Run

Compiles information on the test run, updating after each scenario has completed execution.

TestEvolve.test_run

Example usage:

File.write(TE.test_run.directory + '/path/to/file', 'Important Information')