This section describes various concepts used when describing JUseCase. If you feel something is missing, or if something needs further clarification, use the JUseCase project page on source forge to submit your ideas/requests.

Event

Anything that occurs due to user interaction or an application event. The most common type of event is a Swing event, such as a button being pressed or items being selected in a list. User interaction events are recorded and simulated by event recorders/simulators. Application events are handled by the script engine.

Application event

An event that is not triggered by user/GUI interaction, such as a file being fully loaded into memory, or an incoming connection on a network socket. They may (and probably should) be recorded when running in recording mode. When JUseCase reads an application event command from the use case script in replay mode, the replayer will pause until the given application event occurs. If this was not the case, use case commands following an application event might not be valid. There is a more detailed description of application events on the TextTest homepage.

Script engine

The JUseCase core, represented by a class called ScriptEngine, which reads the configuration file and sets up JUseCase accordingly. The class also has a number of methods for interacting with JUseCase at runtime, see the API for details.

Event recorder/simulator

The event recorders/simulators are the JUseCase objects that are responsible for converting events to and from use case commands. These JUseCase classes are all given a name starting with Scripted (ScriptedButton for JButton event recorders/simulators, ScriptedList for JList event recorders/simulators etc.), and have static "connect" methods that set up the corresponding recorders/simulators. See the API for a list of available event recorders/simulators.

Use case script

When running your application with JUseCase configured for recording mode, all event recorders and simulators will respond to their respective events and write the corresponding use case command name to a file called a use case script. The configuration file's "record" property states where to store this use case script and what to call it.

In replay mode JUseCase will read the use case script pointed out by the "replay" property in the configuration file. Each line in the use case script is a command, which when interpreted will cause JUseCase to simulate the event to which the command name was assigned.

Configuration file

JUseCase is configured with a plain-text configuration file, jusecase.properties, which must be put in the directory from where your application is launched. The file may contain the following properties: