wiki:path:pathBrowser

Version 6 (modified by michael.perscheid, 10 years ago) ( diff )

--

PathBrowser

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.

Description

Figure 6.5 shows our two extensions. First, we offer test cases as entry points into behavioral examples of specific methods. We reuse the already collected test coverage data from PathMap and present it in the new pane on the right side. 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. Thus, developers learn how a method works and so comprehend source code abstractions by debugging into examples. Second, we integrate the hidden test knowledge into source code by presenting invariants and dynamic contracts of our state navigation. If a specific program entity possesses generalized object properties, then a label automatically shows its exploited run-time information while editing source code. For example, we harvested the ByteString class as type for the argument aValue. This information allows developers to understand source code better, especially in dynamically typed languages such as Smalltalk where type information is rather implicit. Furthermore, we extend the browser with our dynamic contracts. There are buttons for displaying the source code of invariants (inv), pre- and post-conditions (pre/post). The Smalltalk code at the bottom shows all the generated assertions from our collected invariants. Developers can also add manual assertions to this source code. In the example of Figure 6.5, we present the pre-condition contract for the method WAResponse»headerAt:put:. The assertion DCContract expectCorrectSpellingOf: aString (line 9) throws a violation in our Seaside typing error and reveals the crucial state anomaly.

Screenshot

How to Use

  • open menu
  • note: new default browser
  • all Path tools open a PathBrowser
  • extensions only available if browsing classes of current project (ref PathProject)

User Interface

inv/pre/post -- contracts & anzeige im browser fenster neue pane link to test cases --> click on test case -> new browser, debugger, or pathfinder new buttons coverage (underlined statements), path views (ref) overlay for type information (ref to type harvesting)

Attachments (1)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.