Given a UI based software (e.g., JHotDraw) with source code, how can I create a scenario that is able to exercise a specific set of classes? For example, a scenario to exercise the AlignmentCommand class in JHotDraw is described as:
(1) Launch JHotDraw; (2) Click on the rectangle tool; (3) Draw two rectangles; (4) Select two rectangles; (5) Click on the align command; and (6) Close JHotDraw.
This scenario is manually created by reading the source code and documentations. So does anyone know some general or even automatic approaches to do so?