house fly

JSwat Project

Testing Console Mode


The console interface of JSwat is one of several possible modes in which the program can be run. This mode is useful when the test environment lacks a graphical component set based on JFC (Swing). In this case, JSwat must be launched with the '-console' switch. This switch must be the first one following the JSwat "Main" class name. See this checklist for a description of starting JSwat in console mode.

The console mode lacks the panels, dialogs, toolbar, menubar, and source views, so testing these is impossible in this mode. Because all of these features are missing, it is especially important that JSwat alerts the user whenever the program status changes or events occur in the debuggee VM. So, testing the console interface consists primarily of testing the JSwat commands.

Command Input Prompt

The command input prompt (>) is what prompts the user for input. Without this prompt the user will not soon realize that the program is waiting for input. Because of this, it is very important that the prompt always be printed after any command is invoked.

With that said, it is necessary to realize that printing the prompt at exactly the right times is extremely difficult. It is made difficult by the fact that JSwat often prints out status messages and event alerts at random times. When this happens, it is impossible for the console adapter to know if there is more output to come or not. Instead, the console adapter does nothing in this case and relies on the close observance on the user's part to notice that the command input prompt is separated from the input cursor by events that where printed to the console. Fortunately, many Unix shell users are quite familiar with this problem. Most, if not all, xterm implmentations have this very same problem.



Back