126.96.36.199.Anatomy of a Test Script
In this section we have a quick look at the recorded test. By the time you finish recording the earlier test, the editor should have the following recorded test:
click("list-view_2", "FXML Login Demo")
assert_p("Please review your profile.", "text", "Please review your profile.")
The require_fixture statement within the marathon marker block, identifies the fixture to be used for running the test script. You can have multiple fixtures in your project – each one differing either by the way the application is launched or by setting up test environment.
- test method
All MarathonITE test scripts have test entry point. This is the entry point for the test and executed after the fixture setup method.
select is MarathonITE‘s main method for setting the state of a component. This method takes an object name and a value in most cases. The object name is used to look into the object map to find the recognition properties and the state of the object is set using the value.
click does what you expect it to do.
MarathonITE uses assert_p to add a check point to the script. The parameters are the object name, the property and the expected value.
with_window sets the top level context in which the other statements need to be executed. MarathonITE changes the object map context to the given window name as well as informing the Java driver (the selenium/webdriver for Java applications) to switch_window.