王凡臺灣大學:電子工程學研究所王人柏Wang, Jen-PoJen-PoWang2007-11-272018-07-102007-11-272018-07-102006http://ntur.lib.ntu.edu.tw//handle/246246/57289Message Sequence Charts (MSCs) have widely used in software engineering for sys- tem requirements and test speci‾cations. Since 2005, MSCs also have been adopted as the test speci‾cation of TTCN-3 (Test and Testing Control Notations). We have developed a user-friendly environment for the construction of MSC test speci‾cations. We have a parsing table that is a data structure storing information of MSCs. Our GUI (Graphical User Interface) reads the parsing table then shows symbols on the window. User can edit these symbols and save back to parsing table. This thesis re- ports the implementation technology of GUI supporting MSCs and TTCN-3 Graphical presentation format (GFT).1 Introduction 1 2 Message Sequence Chart 5 2.1 Basic Message Sequence Chart . . . . . . . . . . . . . . . . . . . . . . . 6 2.1.1 Instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.1.2 Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.1.3 Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.1.4 Condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.1.5 Action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.1.6 Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.1.7 Inline Expression[13] . . . . . . . . . . . . . . . . . . . . . . . . 10 2.2 A MSC example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3 Testing and Test Control Notation-3 (TTCN-3) 15 3.1 TTCN-3 by Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.1.1 Problem Domain . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.1.2 TTCN-3 Modules . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.1.3 Data Types and Templates . . . . . . . . . . . . . . . . . . . . . 19 3.1.4 Components and Ports . . . . . . . . . . . . . . . . . . . . . . . 22 3.1.5 Testcase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.1.6 Advanced Work of our DNS Example . . . . . . . . . . . . . . . 26 3.2 Test Con‾guration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 3.3 Graphical Presentation Format of TTCN-3 (GFT) . . . . . . . . . . . . 31 3.3.1 GFT and TTCN-3 Core Language . . . . . . . . . . . . . . . . 31 3.3.2 GFT symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 3.3.3 The Restrictions on MSC from GFT . . . . . . . . . . . . . . . 33 3.3.4 A GFT example . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 4 Parsing Table 36 4.1 Text Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 4.2 Event Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 4.3 Reference Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 4.4 An Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 5 Implementation 44 5.1 wxWidgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 5.2 Tool Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 5.3 Techniques of Implementation . . . . . . . . . . . . . . . . . . . . . . . 49 5.3.1 Load from The Parsing Table . . . . . . . . . . . . . . . . . . . 50 5.3.2 Store to Parsing Table . . . . . . . . . . . . . . . . . . . . . . . 51 5.3.3 Controlling Finite State Machine . . . . . . . . . . . . . . . . . 52 6 Experiments 59 7 Related Works 61 8 Conclusions 63 A C++ Classes 65 A.1 Global Variable Header File . . . . . . . . . . . . . . . . . . . . . . . . 65 A.2 Parsing Table C++ Header File . . . . . . . . . . . . . . . . . . . . . . 67 A.3 MyShape C++ Class Declaration . . . . . . . . . . . . . . . . . . . . . 68 A.4 MyCanvas C++ Class Declaration . . . . . . . . . . . . . . . . . . . . 69 Bibliography 701119247 bytesapplication/pdfen-US軟體圖形介面Software systemGraphical InterfaceTest case generation軟體系統測試案例圖形介面之技術研究The Graphical Interface Design for Software System Test Case Generationthesishttp://ntur.lib.ntu.edu.tw/bitstream/246246/57289/1/ntu-95-R93943157-1.pdf