|Version 16 (modified by 8 years ago) ( diff ),|
PathBrowser extends Squeak’s standard source code browser with additional user interface elements that provide access to Path's analyzed test information. So, developers can further improve their program comprehension with revealed coverage data, type information, and derived assertions about the system under observation.
After analyzing the system with our PathMap, we offer developers access to the derived information with our extended source code browser called PathBrowser. We enhance the standard browser with mainly five new features:
- Test coverage: We reuse the already collected test coverage data from PathMap and present it in a new pane. With a click on a corresponding test case, developers can start a symbolic debugger or our PathFinder. Both tools stop their execution at the first call of the selected method and provide insights into its concrete run-time behavior.
- Statement coverage refinement: Based on the already collected test coverage, developers can also refine coverage data at statements on demand. For that, we re-execute all covering tests, analyze the currently selected method, and present the executed statements by underlining the corresponding source code.
- Type information: With the help of our type harvesting approach, we have already gathered type information for instance variables, arguments, and return values from test cases. To support program comprehension during implementation tasks, we present this data with overlays that appear when developers mark a related variable.
- Contracts: We extend the browser with dynamic contracts from our test-driven fault navigation. There are buttons for displaying the source code of invariants (inv), pre- and post-conditions (pre/post). Developers can also add manual assertions to this source code.
- PathView: We offer a button to open a model-based source code view directly from the selected class or method snippet.
How to Use
- First, you need a proper Path project that is selected as current. For more information see PathProject.
- To start PathBrowser choose the tool either in the world docking bar at the top (Apps -> PathBrowser) or in the world menu (open... -> PathBrowser).
- Since our new features require access to information from the current project, all functionality is only available if developers browse classes that are part of the project's selected categories and the required information has already been analyzed with our PathMap. If this is not the case, the related features are disabled.
- Optionally, we also recommend to make PathBrowser your new default browser. Start a standard browser, click on the blue button (top-right corner), select choose new default browser, and select SBrowser.
User Interface Extensions
- Fifth pane (on the right side)
- This pane displays all test cases that cover the selected method in the fourth pane (left side). With a click on a test case, developers can open a new browser with the corresponding test, a symbolic debugger, or our lightweight back-in-time debugger PathFinder. While the symbolic debugger sets a breakpoint in the corresponding method, run the chosen test case, and starts the debugger at the covered point in time. Our PathFinder analyzes the entire test case execution and highlights all occurrences of the chosen method within this behavior.
- Buttons (inv, pre, post) below class pane respectively method pane
- If contracts are available, these buttons allow developers to explore the generated assertions for class invariants, method pre- and method post-conditions. Developers can also change the corresponding source code and write their own assertions. However, please be careful. PathMap's contract generation will override or remove these manual statements within the next run.
- Coverage button
- refines the method coverage at the statement level. It will execute all covering test cases of the selected method and analyze the covering byte codes only for this specific method. In the end, all covered statements will be underlined and present developers further details about executed source code. However, we do not store this information. For later access, this analysis has to be rerun.
- Path views button
- displays all model-based views that include the selected source code entities. It also allows developers to create new views that will be opened within our PathView.
- Overlay at variable identifiers
- shows dynamically derived type information from test cases for instance variables, arguments, and return values (move cursor over method selector). We harvest these types from the actual run-time behavior of test cases. For that reason, this information has a probability to be too specific or too generic (depending on test coverage and quality). Nevertheless, for program comprehension this type information is already very helpful.