Performing White-Box Testing
Jtest performs white-box testing, along with all other appropriate types of testing, each time that you test a class or set of classes.
To perform white-box testing:
- Open the appropriate UI for your test. The Class Testing UI is used to test a single class; the Project Testing UI is used to test a set of classes.
- The Class Testing UI opens by default when Jtest is launched.
- The Project Testing UI can be opened by clicking the Class Testing UI's Project button.
- If a class or set of classes is already loaded into the UI you are using, click the New button to clear the previous test.
- Use the Browse button to indicate what class or set of classes you want to test.
- Test the class or project by clicking the Start button.
- If you only want to perform dynamic analysis, right-click the Start button, then choose Dynamic Analysis from the shortcut menu.
- If you only want to execute automatically-generated test cases, right-click the Start button, then choose Dynamic Analysis> Automatic from the shortcut menu.
Jtest will then run all requested tests.
Uncaught runtime exceptions found will be reported in the Uncaught Runtime Exceptions branch of the Errors Found Panel (if you tested a single class) or the Results Panel (if you tested a project).
Suppressed Exceptions
The following types of exceptions are suppressed by default:
- Exceptions in Throws Clause
- DirectIllegalArgumentExceptions
- Explicitly Thrown Exceptions
- Exceptions Caught By Empty Catch
- Direct NullPointerExceptions
You can enable the reporting of any of these exception types by modifying settings in any parameter tree's Dynamic Analysis> Test Case Execution> Pre-Filtering Categories branch.
All exceptions found-- including suppressed exceptions-- are displayed in the View Test Cases window. To see the reason why one of the exceptions listed here was suppressed, right-click that exception's node (the node with the lightning bolt icon) in the View Test Cases window, then choose Why Suppressed? from the shortcut menu.
For information on determining what types of exceptions you want suppressed, see Customizing White-Box Testing and Dynamic Analysis Suppressions.
Related Topics
About White-Box Testing
Customizing White-Box Testing
Jtest Tutorials
|