Test Templates
Overview
Test templates are structured, reusable specifications that encode testing knowledge and architectural models to systematically generate test cases. They appear in several distinct testing contexts, including model-based testing, hardware functional verification, and dependability testing of distributed systems.
Test Templates in Functional Processor Verification
In the context of hardware functional verification, test templates serve as the primary mechanism for encoding testing knowledge and architectural models. According to IBM Research, Genesys-Pro is the main test generation tool for functional verification of IBM processors, including several complex processors. The tool relies on test templates to drive test program generation. Although using the full power of test templates requires a high level of expertise to model architectures and testing knowledge, Genesys-Pro's language considerably reduces the effort needed to define and maintain knowledge specific to an implementation and verification plan [Genesys-Pro: Innovations in test program generation for functional processor verification].
The Test Template Framework (TTF)
The Test Template Framework (TTF) is a model-based testing method for the Z notation. In the TTF, test cases are generated from test specifications, which are predicates written in Z. The Z notation itself is based on first-order logic with equality and Zermelo-Fraenkel set theory, so a test case is a witness satisfying a formula in that theory. Research has applied Satisfiability Modulo Theory (SMT) solvers, such as Yices and CVC3, as engines to find test cases from TTF's test specifications. This required shallow embeddings of a significant portion of the Z notation into the input languages of these solvers, since they do not directly support Zermelo-Fraenkel set theory as defined in Z. The approach was evaluated on a number of test specifications from eight case studies [Applying SMT Solvers to the Test Template Framework, arXiv:1202.6120].
Test Templates in Dependability Testing
In dependability testing of distributed systems, a systematic approach has been proposed to identify (1) characteristic sets of critical system elements for dependability testing (single points of failure and recovery groups) based on the concept of layered networks, and (2) the most important combinations of components from each recovery group based on a combinatorial technique. Based on these combinations, a set of test templates is determined to be performed in order to demonstrate system dependability [Dependability Tests Selection Based on the Concept of Layered Networks, arXiv:1502.05179].
Key Characteristics
- Reusability: Test templates encode reusable testing patterns that can be instantiated multiple times.
- Knowledge encapsulation: They capture architectural and testing expertise in a structured form.
- Automation support: They enable automated test generation when combined with constraint solvers or specialized tools.
- Domain adaptability: Test templates have been applied in diverse domains including formal specification languages (Z), processor verification, and distributed systems dependability.