Software testing is the key work of assuring software quality and improving software reliability, and the essence of testing is how to design and generate test cases. Recently, with the maturity and popularity of object-oriented technology, testing approach based on unified modeling language UML has become the active topic. UML activity diagram is a special form of state machine. It emphasizes the controlling flow from action to action, and it can depict the concurrent activities. Studying on method for generating test cases based on activity diagram is significant for the testing of software, which has some concurrent and interactive activities.The thesis proposes a method of generating test cases based on activity diagram for concurrent and interactive software. The method generates test scenario with McCabe basis paths, and it compress concurrent modules in active diagram. It finds out the basis paths with basis path searching algorithm. Concurrent activities are instanced by improved filtering method of random generation. Then, basis paths are replaced, so that whole path is formed, and test scenario is created. It employs extended week robust equivalence class testing method to create test case by combining input data. And then, through building active diagram combining tree and taking the idea of integration test, it integrates test cases of single active diagram into combined active diagram to create test cases of higher level active diagram, which abides by the sequence from bottom to top.The thesis introduces fundamental concepts and methods of software testing, and it analyzes the testability of UML dynamic model. It brings out the definition and formalized description of syntax and semantics of activity diagram. The design process of the method mentioned above is addressed in detail. Furthermore, the method is applied to a project to create test cases. The result shows that the method can fit to the scenario of test cased creating, which is concurrent and interactive. The number of test cases can be decreased. It is feasible and effective. |