Marathon Java GUI Testing – Status update for 1.0
I am waiting for a new version of VLDocking to be released – and hence some delay in releasing next version of Marathon. Meanwhile, I worked on few more features (some small and some big) for easing recording of the automated tests.
- When recording a test case marathon now minimizes the main window and shows a small controller window. This should reduce the clutter of the screen to a large extent. The main window is restored when either you close the controller window or stop recording the test case.

- A new preferences dialog allows you to change options like hot key and menu click for popping up the Marathon assertion menu. You can even change the font used for the editor – that is the test case files that are shown.

- Along with #2 comes the ability of using Marathon for recording test cases even when your application pushes its own event queue. If the application under test makes use of event queue, just use the keyboard short cut for popping up the Marathon assertion menu. The mouse click does not work.
- Our Java testing tool’s UI has been spruced up. We are using JGoodies looks and VLSolution’s vldocking framework for most of the UI enhancements. Now you have the ability to move the panels like test tree panel or Navigator panel (that shows the files) whereever you want in the desktop. Marathon even remembers the preferences and restores the same state when you restart it.

- Project directory structure for the testing projects in Marathon is changed. Now all paths (like classpath etc.) are saved relative to project directory. The MPF file is no more needed and the project settings are saved in the Project directory in a file named ‘.project’. Now, the project settings can also be modified from within Marathon. The Edit menu sports an option called ‘Project settings…’ (what else?) using which you can modify the settings for the current project. The CaptureScripts directory is renamed to Modules – this reflects the ability of Marathon to use any jython functions and not just captured scripts as functions.
- A new Project Settings option ‘Ignore Components’ has been added to the test project. You can use this to inform Marathon that it need to ignore clicks on the components. By default when a new project is created this is populated with JScrollBar, JToolBar etc. You can update it if you find Marathon recording extraneous clicks while recording your test cases.

- A new scripting element ‘select_menu’ makes its appearance in Marathon now. This is used to record menu activations either using keyboard or mouse.
- Recording on collection components like JTree, JTable improved. Now Marathon records multiple selections on these components – so you can stop asking me to record CTRL and SHIFT keys while recording
. Two more controls also make debut in this release. JSlider and JProgress bar. Those applications that make use of these two controls need not have work-arounds in the test cases. - Finally, the keystroke recording for test cases is here. Marathon not only records the keystrokes but it tries to be intelligent about not recording keystrokes that do not make sense. If a keystroke is typed that is a menu accelerator key, marathon records it differently.
There are lot more changes comming in next version – which I am toying with the idea of calling Version 1.0. The full list of changes will ofcourse be available in the ChangeLog.
There are few more things I am working on currently. Most important of those are:
- Mouse clicks record with position and modifiers. These will be recorded only when Marathon does not support a particular component.
- Drag and Drop. John submitted a patch for this. I am working on making it generic enough to work with all Marathon components.
- A new naming strategy that gives more importance on what is shown on the screen like button texts and labels, rather than components name given by setName().
Comments?
Posted by KD on September 25th, 2006
