Skip to Main Content
When doing test activities using TTCN-3, achieving Codec needs testers to write a lot of codes. In order to reduce testing cost, this paper proposes a method to automatically generate Codec. The method firstly defines an abstract model for TTCN-3 test suites, TTCN-3 type tree, and then, we issue the method contains three algorithms, including the algorithm of establishing TTCN-3 type tree according to the TTCN-3 Test Suites, the algorithm of encoding each node according to the preorder traversal sequence, the algorithm of decoding each node according to the postorder traversal sequence. The method is applicable to all TTCN-3 test suites and greatly improves test efficiency. At last, an example, an information manage system developed by .net, demonstrates that the method is usable and high efficient.