Recommended: Sing it, brah! 5 fabulous songs for developers
JW's Top 5
Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs
Page 3 of 7
Figure 1. Jtest's Class Testing UI consists of a menu bar, a toolbar, a Class Name panel, a Test Progress panel, an Errors Found panel, and a status bar. Click on thumbnail for full-size image.
| Note |
|---|
| For simplicity, all this article's static/dynamic analysis examples use the Class Testing UI. |
Use the Project Testing UI to test a project's set of classes. This UI consists of a menu bar, a toolbar, a Project Testing
UI Controls panel, a Results panel, and a status bar. Though similar to their Class Testing UI counterparts, the menu bar,
toolbar, and status bar are specific to the Project Testing UI. For example, File's Open menu item lets you open an existing
project test parameter's .ptp file, and that file's name and location appear in the status bar. A project test parameter is a configurable test setting
that applies to a specific set of classes. The Project Testing UI Controls panel and Results panel distinguish the Project
Testing UI from the Class Testing UI:
Figure 2 illustrates the various GUI elements that compose the Project Testing UI.
Figure 2. Jtest's Project Testing UI consists of a menu bar, a toolbar, a Project Testing UI Controls panel, a Results panel, and a status bar. Click on thumbnail to view full-size image.
| Tip |
|---|
| To view a professional report of test results (after the current test session's various static and/or dynamic analysis tests complete), choose the Report menu item from the View menu. |
Static analysis examines executable code or equivalent source code to learn if that code conforms to industry-standard guidelines. Jtest performs static analysis by comparing executable code or the equivalent parsed source code with coding rules that represent more than 300 guidelines. Because research suggests code written to industry-standard guidelines has a lower probability of defects than code that does not follow those guidelines, any deviation from the guidelines suggests a potential defect. Jtest reports deviations as errors in either the Errors Found panel (for the Class Testing UI) or the Results panel (for the Project Testing UI). Furthermore, Jtest's editor highlights source code lines where deviations occur.
Let's perform a static analysis of last month's Lines project. If you recall, that applet project consisted of a single Lines.java source file (which produces a single Lines.class classfile). We use the Class Testing UI to perform the analysis. Complete the following steps to statically analyze Lines: