Abstract

ContextThe nature of the object-oriented development process is iterative and incremental, and through this process, software artifacts are refined and evolved continuously; however, most of proposed methods for deriving test cases from formal, object-oriented specifications have been adapted from previous structural techniques and are not aligned with such an incremental process. These methods are not adaptive with changes in the software specification, and there is no mechanism to evolve test artifacts respectively. Moreover, the existing methods do not cover all different object-oriented testing levels, i.e., intra-method, inter-method, intra-class and inter-class levels. ObjectiveThis paper presents an incremental method for extracting tests from formal, object-oriented specifications. Extracted tests are adaptive with changes in the class specification. In addition, the proposed method covers all different object-oriented testing levels. MethodWe first make a test machine (as a new notion introduced in this paper) for each class operation to cover the intra-method test level. With the combination of these test machines, new test machines covering the inter-method and intra-class test levels can be made. Extracted tests can be easily modified when the class specification is modified, and, in this way, our approach enables iterative and incremental test derivation. With test machines corresponding to a class hierarchy, this approach can also be used for deriving inter-class tests. ResultsAs a case study, we applied our method to the specification of a computer game. Results indicate that test machines can incrementally be extracted through a class hierarchy, and a parent test machine can be used to obtain its corresponding child test machines (by reusing test artifacts). Furthermore, by running extracted test cases on the implemented game, we discovered some real bugs. ConclusionThe proposed approach can incrementally extract tests and bring extendibility and reusability as two main advantages of the object- oriented paradigm to the test domain.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call