With the increasing of scale and complexity of software system, new challenges for software quality assurance technology formed. Software design modeling controls the high complexity of software system by raising the abstraction level. And with the Model Driven Development (the Model Driven Development, MDD) gaining more and more attention in academia and industry, software Development concerns shift from code-centric to model-centric. Unified Modeling Language (Unified Modeling Language, UML) is the de facto standard for modeling of design and analysis of software system. It provides several types of model diagrams, describes systems from the aspect of structure and behavior. As the system design specification, UML model will directly affect the quality of system implementation. To ensure its correctness is helpful to reduce the overall cost of software development and maintenance. However, existing approaches are limited to human review, lacking support of automation. This Paper mainly studies the model-based software simulation method. It is a mature technology in engineering fields such as electronics, machinery. Product simulation technology inspires our research on the automatic testing method for models to confirm whether the model in line with expectations, which can make us more easily found defects in the early stages of the software development cycle. So model-based simulation technology has become an urgent demand and it has broad application prospects.The main contribution of this paper is as follows:(1) We put forward the formal definition of the UML activity diagram for simulation. In order to solve the inconsistent of abstraction levels of models and the situation of incomplete models, we propose the method of refining and extension for activity diagram, defects of activity diagram and its classification and a sufficient degree of coverage criteria.(2) We propose the activity diagram simulation method based on symbolic execution. This method takes the activity diagram as the dynamic behavior model of the application under test, symbolically execute the activity diagram using depth-first traversal strategy, so as to realize the simulation of activity diagram.(3) We propose the model-based concolic testing method. In the process of simulation, we generate concrete test cases including testing input and expected output, method call sequence for white-box testing and this method solves the problem caused by circulation and concurrency. Through the predefined number of executions, prevent circulation leads to the state space explosion execution. Through the concept of set equivalent, we uniform program behavior under concurrent cases. After test case generation, we use the specific test cases to drive instrumented source program to execute, collect the running trace and then check consistency with the corresponding execution path in activity diagram, so as to realize the test automation.(4) Based on the above research work, we developed a prototype tool and a case study was carried out. Experiments show that the symbolic-based simulation method can effectively find the defects on activity diagram. And the concolic execution testing method on the activity diagram is able to automatically generate and execute the specific test cases and check the consistency between code implementation and model behavior. |