Automatic extraction of abstract-object-state machines from unit-test executions

Tao Xie, Evan Martin, Hai Yuan
2006 Proceeding of the 28th international conference on Software engineering - ICSE '06  
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)
more » ... m 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.
doi:10.1145/1134285.1134427 dblp:conf/icse/XieMY06 fatcat:exxhnvwqyjdltclanj2r2zg7ha