Generating Test Cases from UML Activity Diagram based on Gray-Box Method

Wang Linzhang, Yuan Jiesong, Xiaofeng Yu, Hu Jun, Xuandong Li

2005 · 210 citations · 10 references

Concepts

TL;DR

Test case generation is essential, and UML, as a widely used semi‑formal modeling language, naturally serves as a source for specification‑based test generation. This paper proposes generating test cases directly from UML activity diagrams using a Gray‑box method that reuses design information to avoid costly test model creation. The approach derives test scenarios from activity diagrams, extracts input/output sequences, constraints, and expected method calls, then applies category‑partitioning to generate parameter values and systematically produces a test suite to detect inconsistencies between implementation and design. A prototype tool named UMLTGF has been developed to support this process.

Abstract

Test case generation is the most important part of the testing efforts, the automation of specification based test case generation needs formal or semi-formal specifications. As a semi-formal modelling language, UML is widely used to describe analysis and design specifications by both academia and industry, thus UML models become the sources of test generation naturally. Test cases are usually generated from the requirement or the code while the design is seldom concerned, this paper proposes an approach to generate test cases directly from UML activity diagram using Gray-box method, where the design is reused to avoid the cost of test model creation. In this approach, test scenarios are directly derived from the activity diagram modelling an operation. Then all the information for test case generation, i.e. input/output sequence and parameters, the constraint conditions and expected object method sequence, is extracted from each test scenario. At last, the possible values of all the input/output parameters could be generated by applying category-partition method, and test suite could be systematically generated to find the inconsistency between the implementation and the design. A prototype tool named UMLTGF has been developed to support the above process.

References

10