Automatic Extraction of Abstract-Object-State Machines Based on Branch Coverage

Hai Bo Yuan, Tao Xie · 2005

Some requirement modelling languages such as UML’s statechart diagrams allow developers to specify requirements of state-transition behavior in a visual way. These requirement specifications are useful in many ways, including helping program understanding and specification-based testing. However, there are a large number of legacy systems that are not equipped with these requirement specifications. This paper proposes a new approach, called Brastra, for extracting object state machines (OSM) from unit-test executions. An OSM describes how a method call transits an object from one state to another. When the state of an object is represented with concrete-state information (the values of fields transitively reachable from the object), the extracted OSMs are simply too complex to be useful. Our Brastra approach abstracts an object’s concrete state to an abstract state based on the branch coverage information exercised by methods invoked on the object. We have prototyped our Brastra approach and shown the utility of the approach with an illustrating example. Our initial experience shows that Brastra can extract compact OSMs that provide useful information for understanding state-transition behavior.

Read the paper · More papers on PaperTik