User:JimVS/Marathon Java GUI Testing

Marathon Java GUI Testing Marathon is an open source testing framework for Java GUI applications developed using Swing. One creates a test in Marathon by "recording" the application being tested. As the tester manipulates the GUI interface (clicking buttons, selecting files) Marathon records the actions in a Jython script. The tester dynamically adds asserts to the test script during recording by mousing over and selecting a GUI component and then selecting an assert from a pop-up context menu. Tests can then be played back either individually or as a member of a JUnit test suite. Marathon supports both Jython and JRuby test scripts.

The Marathon tool is a testing IDE that also provides test fixtures and modules, a script debugger, and a script console that can be used to inspect the running application while recording or playing a test script. Marathon also has the ability to record bitmaps.

Testing GUI applications is difficult because one must test both the domain, the system functionality, and the GUI itself. Marathon can be categorized as a GUI event capture/playback system, in contrast to a bitmap capture/playback system. The bitmap systems have the advantage of relatively simple test generation. One works through a GUI test scenario, captures the desired screen as a bitmap, and subsequently plays back the recording and compares the test versus the recorded bitmap. The disadvantage to this testing strategy is that the test fails when minor GUI changes are made, such as changing the color of an element.

A GUI event recording/playback requires more test design in that one must select the relevant GUI components and insert asserts in the test script. However by selecting the component values most relevant to an application's success and inserting explicit asserts for those components the tester decreases the subsequent testing noise, albeit at the risk of perhaps not testing values for other relevant components.