Automatic extraction of abstract-object-state machines based on branch coverage

H. Yuan,T. Xie
2005-01-01
Abstract:Some requirement modelling languages such as UML's statechart diagrams allow developers to specify require-ments of state-transition behavior in a visual way. These requirement specifications are useful in many ways, includ-ing helping program understanding and specification-based testing. However, there are a large number of legacy sys-tems that are not equipped with these requirement specifica-tions. 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), th e 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 ex-ercised by methods invoked on the object. We have proto-typed our Brastra approach and shown the utility of the ap-proach with an illustrating example. Our initial experience shows that Brastra can extract compact OSMs that pro-vide useful information for understanding state-transition behavior.
What problem does this paper attempt to address?