In previous chapters, we have focused on the development of more or less isolated test cases. Now in this chapter we take a step back and introduce one aspect of TTCN-3 that concerns the development of collections of test cases or test suites, namely, modularity. In addition to concurrency and testing-related constructs, strong support for modularity is probably one of the key features of TTCN-3.
As you have learned in our initial chapters, all TTCN-3 code exists within modules. At least one module is required, which may contain all your TTCN-3 code, but from a language point of view, there is no limit on the number of modules that you may use for structuring our code. In this chapter, we will show how to work with multiple modules, how to import TTCN-3 definitions from one module to another, and how in practice to structure a test suite into several modules.
Modularity and modularisation of TTCN-3 code are important because they can provide the key to a successful testing project. When several TTCN-3 developers work together, modularisation allows easier distribution of code development and maintenance. By using a sensible structuring of your code, existing code can easily be located, which improves reuse and thus reduces the amount of code to write and maintain. Modularisation can also help decrease the turnaround times during the development of large test suites: smart TTCN-3 tools will only re-process those modules that have been changed since the ...