Using Windmill IDE

The Windmill IDE is the graphical tool you can use to create and edit tests, monitor output and interact with Javascript in the browser.

Starting the IDE

windmill firefox http://www.example.com

(If you are on a Mac and prefer Safari, replace firefox above with safari)

You should then see Firefox launch and Windmill load.

When Windmill is done loading you should be presented with two windows, one containing the application you want to test (http://www.example.com) and the Windmill IDE, shown below.


Recording Tests

The record feature lets you quickly build your test.

  • Navigate to the starting page of the site you would like to test.
  • In the IDE, press the record button (farthest to the left of the circular buttons in the top right of the IDE). The icon inside should change from a circle to a square, and the focus will be moved to the main browsing window.
  • Do your testing! (Navigate around the page as you normally would.)
  • When you're done, click the record button in the IDE again. The square will change back to a circle.
    • Waits: You will need to add these when you go to a new page, or call an ajax request, to make sure that the page is ready for the next step in the list.
    • Open: If you manually type an address into the URL bar, this won't be recorded, use the open action.
    • Assertions: To test that the operations you've recorded do what they were supposed to.

Editing Tests

  • The editor is simply a graphical representation of a list of actions to execute against your test page. (You can also directly edit the test files.)
  • The drop down fields for a specific action allow you to provide the information your action needs.
  • The up and down arrows on each action will insert another action above or below that step.
  • The trash can will delete that action, without asking -- so be careful!

Playing the Tests

  • The play icon at the top will play all the actions in the IDE, starting at the top.
  • The play icon on each step will start playing from that step and cascade until there are no more tests left to run. (This can be changed in the settings.)
  • Steps go green/red as they are called and pass/fail.

Saving Tests

Click the save button next to a suite and it will be exported to JSON markup in a separate pop-up (or Python code if you've selected that in the settings). Use the browser's "save page" feature to save this to disk for later playback.

DOM Explorer

The DOM explorer allows you to navigate and explore the DOM in your testing application, and update actions in the IDE to target the selected node (by clicking the node).

  • Start the DOM Explorer by click in the button in the top right of the IDE with an X (second from the right).
  • Your testing window should now be in focus, move your mouse around the page and you should see the element you are hovering over.
  • If you have an action in the IDE the actions fields should be updated on the fly as you move your mouse around the page, until you find the node you want and click. This should turn the explorer off and give focus back the the remote for you to do any editing you would like.

Assertion Tool

The Assertion Tool is designed to allow you to quickly create asserts on the fly. This works initially like the DOM Explorer but has a very different use.

  • Turn on the Assertion Tool by clicking the far right icon in the top right with the letter A on it.
  • Your testing window should now have focus and allow you to move your mouse around the page displaying in the remote the node you are currently over.
  • When you find the node you would like to assert, you can click on it.
  • Your focus should now be back in the remote, and actions should have been generated to validate the state of the node you clicked on when you run this test in the future.

Javascript Shell

Always useful, but even more useful when you are in a browser than has no equal to firebug. This allows you to navigate Javascript in the shell and explore your Javascript objects making your debugging and development just that much easier.

Output Tab

As you are working in the Windmill IDE all possible output is sent to the output tab allowing you to keep an eye on everything happening in Windmill. Anyone developing new functions or extensions for Windmill should remember to send all the possible output they can as well as any performance information to this tab.

Settings Tab

There are some very helpful preferences available to be configured in the settings tab, customize them for your test building pleasure.

System

Break on Failure
When you are running a tests and you encounter a failure, you can configure if the whole test run stops or not.
Suppress Javascript Alerts (Can be done with the reWriteAlerts controller function)
When implemented will capture all Javascript alerts in the testing window.
Details: http://windmill.osafoundation.org/trac/wiki/BookChapter-4-1-TheControllerAPI
Suite Save Formatting
Allows you to specify the format you would like generated when you click to save a suite.

IDE/Recorder

Auto Scroll IDE to bottom
When tests are running in the IDE you can decide if you want the continually be moved to see the latest action, or not.
Absolute click sensitivity when recording
When you are recording a test in your testing window many actions like doubleclick also constitute two single clicks, then the firing of the double click event. When this is selected you are recording every single event, if you would like a cleaner test disable this. However, if you find that the recorder is missing simple clicks on elements you would like to click then you should turn this back on.. temporarily anyway.
Action play button cascades
When you have a set of tests in the IDE you would like to play, the play button for each action starts playback there and cascades until you are out of actions to run. If you would like to step through the actions one at a time, turn this option off and it will only run the single action to which you clicked play.
Use XPath only for explorer/recorder
If you find yourself testing an application with multiple elements that share the same ID, or have a dynamic ID that isn't reliable, you may want to record this action using XPath. If this action has an ID, the recorder will use that unless you turn this option on.

Moving On

Now that you've learned how to use the IDE to record, playback, and save tests you're ready to move on.

You can either learn how to edit your existing test files and author new tests from scratch using markup or your favorite programming language or learn about running the tests you've already saved using the IDE.

Attachments