 |
JSwat Project
Testing Actions
|
File menu
Open File...
File open dialog appears.
- Should open to current working directory the first time.
- Should open to last visited directory subsequent times.
- Filters for "Java Source Files" (ending in
.java
).
- Open a
.java
file.
- Open some other file type.
- Open button.
- Cancel button.
- Dialog close button.
About...
About dialog appears.
-
Should show the following information:
- application name and version
- copyright message
- creation date
- web site URL
- warranty information.
- Ok button.
- Dialog close button.
Exit
When selected, the window should close and the program may
exit.
- If this was the last open JSwat window, the program should
exit.
- If a debuggee VM was launched from JSwat, it should
terminate.
View menu
Refresh
Causes panels to update their contents.
- Will appear to do nothing when session is inactive.
- Threads panel will likely resort the threads when session is
active.
- Invoke when debuggee VM is running.
- Invoke when debuggee VM is suspended.
Debug menu
List running VMs
Prints a list of available JVM connectors to the message log.
- Will always print at least one entry, usually for
com.sun.jdi.SocketAttach
.
Attach to remote...
Shows dialog for inputting hostname and port number of debuggee
VM to attach to.
- Press Ok when fields are empty. Should report that the port
number is invalid.
- Enter only a host name.
- Enter an invalid port number (such as
"abc123").
- Enter valid data to attach to a debuggee VM.
- Ok button.
- Cancel button.
- Dialog close button.
Start VM...
Shows a dialog asking for class name and arguments, with
optional debuggee VM options. In addition, the "Java
Home" and "JVM Executable" fields are available.
- Ok with no class name.
- Ok with invalid JVM executable.
- Ok with invalid Java Home directory.
- Ok with -classic or -hotspot in debuggee VM options.
- Some debuggee VM options are automatically generated by
JSwat, such as the "-classic" and "-cp"
arguments. These will not appear in the "VM Options"
field, however.
- If "Use -classic" is selected in the Launching
portion of the preferences, the
-classic
option
should be added automatically to the debuggee VM options.
- Ok with debuggee VM option containing an incorrect classpath,
i.e. one that points to the wrong directory. When debuggee VM is
resumed, should stop with
ClassNotFoundException
thrown and reported to the messages area.
- Ok with debuggee VM option containing
-cp "class
path
(note the missing closing quote). Should attempt to
launch debuggee VM but will fail. The options printed to the Log
should show "[malformed classpath]" at the point where
the quote is missing.
- Ok with debuggee VM option containing
-cp " class
path"
(note the initial space). This regresses bug
365.
- Ok with non-options in the debuggee VM options field. The
non-options will be passed to the JVM executable which should
stop and report an error (shown in the messages area).
- Ok button.
- Cancel button.
- Dialog close button.
End session
Deactivates the current session.
- If attached to a remote VM, the remote VM will remain
running.
- If debuggee VM launched, will be terminated.
- if session is inactive, nothing will appear to happen.
Terminate VM
Deactivates the current session, terminating debuggee VM.
- If attached to a remote VM, the remote VM will be
terminated.
- If debuggee VM launched, will be terminated.
- if session is inactive, nothing will appear to happen.
Suspend
Suspends the debuggee VM.
- If active, debuggee VM will be suspended.
- Suspend actions are not cumulative. Repeatedly suspending a
debuggee VM will make no difference.
- If session is inactive, prints appropriate notification.
Resume
Resumes the suspended debuggee VM.
- If active, debuggee VM will be resumed.
- If session is inactive, prints appropriate notification.
Breakpoints
Shows dialog containing all defined breakpoints, along with
buttons for managing those breakpoints. See breakpoints checklist for more
information. At a minimum, there are the following test cases.
Set breakpoint...
Shows dialog asking for class name and line number at which to
set breakpoint.
- Ok with empty fields - should complain about line
number.
- Ok with just line number - should complain about class
name.
- Ok with just class name - should complain about line
number.
- Ok with invalid line number (abc123) - should complain.
- Ok with valid data - should set a breakpoint.
- Ok button.
- Cancel button.
- Dialog close button.
Step menu
Step Line
Single-steps a source line; steps into method calls.
- If debuggee VM stopped at a breakpoint, steps as
described.
- If debuggee VM running, prints message about no current
thread.
- If session inactive, displays appropriate notification.
Step Instruction
Single-steps an instruction; steps into method calls.
- If debuggee VM stopped at a breakpoint, steps as
described.
- If debuggee VM running, prints message about no current
thread.
- If session inactive, displays appropriate notification.
Next Line
Single-steps a source line; steps over method calls.
- If debuggee VM stopped at a breakpoint, steps as
described.
- If debuggee VM running, prints message about no current
thread.
- If session inactive, displays appropriate notification.
Next Instruction
Single-steps an instruction; steps over method calls.
- If debuggee VM stopped at a breakpoint, steps as
described.
- If debuggee VM running, prints message about no current
thread.
- If session inactive, displays appropriate notification.
Finish Method
Finishes the current method and returns to the line following
the one that called this method.
- If debuggee VM stopped at a breakpoint, steps as
described.
- If debuggee VM running, prints message about no current
thread.
- If session inactive, displays appropriate notification.
Search menu
Find...
Displays dialog asking for term to look for in currently
selected source file. Option to perform case insensitive
comparison.
- If no source view opened, complains about no selected source
view.
- Search for string with case sensitivity on.
- Search for string with case sensitivity off.
- Ok button.
- Cancel button.
- Dialog close button.
Find Next
Attempts to repeat the last search performed by the
"Find..." action. If no previous search was made,
displays the dialog described above.
- If no source view opened, complains about no selected source
view.
- Invoking this should perform the previous search again.
Options menu
Set Classpath...
Displays dialog allowing the user to modify the classpath. The
dialog contains a list in which each entry is a part of the
classpath. The list entries and be moved forward and backward in
the overall classpath.
- Test with no classpath defined.
- Test with one classpath entry.
- Test with multiple classpath entries.
- Add more than one entry.
- Select the first entry. "Move Up" is disabled and
"Move Down" is enabled.
- Select the last entry. "Move Down" is disabled and
"Move Up" is enabled.
- Select an entry: "Remove Path" is enabled.
- Move Up - moves selected entry up one.
- Move down - moves selected entry down one.
- Remove Path - removes the selected entry.
- Ok - ensure classpath is set appropriately by looking at the
output from the '
classpath
' command.
- Cancel button.
Set Sourcepath...
Displays dialog allowing the user to modify the sourcepath. The
dialog contains a list in which each entry is a part of the
sourcepath. The list entries and be moved forward and backward in
the overall sourcepath.
- Test with no sourcepath defined.
- Test with one sourcepath entry.
- Test with multiple sourcepath entries.
- Add more than one entry.
- Select the first entry. "Move Up" is disabled and
"Move Down" is enabled.
- Select the last entry. "Move Down" is disabled and
"Move Up" is enabled.
- Select an entry: "Remove Path" is enabled.
- Move Up - moves selected entry up one.
- Move down - moves selected entry down one.
- Remove Path - removes the selected entry.
- Ok - ensure sourcepath is set appropriately by looking at the
output from the '
sourcepath
' command.
- Cancel button.
Capture Messages...
Displays dialog asking user where to capture messages to.
Options include sending messages to "stdout" and/or to a
named file.
- Ok with nothing selected - disappears silently.
- Ok with "stdout" choosen - new messages appear on
console.
- Ok with "file" choosen, but no file name -
complains "file not found".
- Ok with "file" and name of read-only file -
complains about file not being writable.
- Ok with both "stdout" and "file"
selected.
- Ok button.
- Cancel button.
- Dialog close button.
Define Macro...
Shows dialog asking user to input macro name and commands to
associate with the given macro name.
- Ok with empty fields - complains about missing name.
- Ok with macro name only - deletes the named macro.
- Ok button.
- Cancel button.
- Dialog close button.
Preferences...
Shows a dialog with numerous options that can be enabled and
values that can be set for the program. Use the following preferences checklist to test this
dialog. At a minimum, there are the following test cases.
- Ok button.
- Cancel button.
- Dialog close button.
Look & Feel
Displays submenu of available JFC "look & feel"
options.
- Choosing a look and feel should immediately change the
interface to the new look and feel. Only the window frame is
unaffected.
- Choosing "Windows" on a non-Windows system will
report a message to the console and disable the
"Windows" option.
- Choosing "MacOS" on a non-Macintosh system will
report a message to the console and disable the "MacOS"
option.
- The setting is remembered from one invocation of JSwat to the
next.
Windows menu
Minimize All
Causes all of the opened source view windows to become iconified
(i.e. minimized). When no source windows are opened, does
nothing.
- Select when no windows opened - nothing happens.
- Select when windows are opened - observe iconification.
Maximize All
Causes all of the opened source view windows to become
deiconified (i.e. maximized). When no source windows are opened,
does nothing.
- Select when no windows opened - nothing happens.
- Select when windows are opened - observe
deiconification.
Window list
This is not a menu item per se but rather a special feature of
the Windows menu. As source views are opened their name is added to
the Windows menu. When source views are closed, their entry in the
menu is subsequently removed.
- Make sure list is initially empty.
- Watch list grow as windows are opened.
- Watch list shrink as windows are closed.
- Select a window from the menu and it will be brought
forward.
- Select an iconified window from the menu and it will be
deiconified and brought forward.
Back