Abstract
Testing real-time systems requires verifying not only functional correctness but also strict adherence to timing constraints. This paper presents an automated framework for generating timed test suites by leveraging formal models. Specifically, the approach utilizes Timed Input Output Automata (TIOA) for system specifications and Message Sequence Charts (MSC) to define specific test purposes. By transforming MSCs into TIOAs and constructing a synchronous product, the method focuses the testing process on relevant scenarios, mitigating the state space explosion problem common in real-time testing. The resulting test cases are sampled via a grid automaton and are compatible with industrial standards like the Tree and Tabular Combined Notation (TTCN).
Introduction
The complexity of real-time systems—such as medical devices, air traffic control, and communication protocols—makes manual test generation error-prone and inefficient. In these systems, a "correct" output delivered at the "wrong" time is considered a failure. Formal methods provide a rigorous basis for automation, yet they often suffer from the "state space explosion" problem when dealing with continuous time and multiple clock variables.
Exhaustive testing is often computationally infeasible. This research proposes a "test purpose-driven" approach. Instead of attempting to cover every possible state, the framework generates tests for specific requirements or scenarios defined by the user. This paper details the methodology for integrating MSC-based test purposes with TIOA specifications to produce manageable, high-quality test suites.
Methodology
Dual Modeling and Transformation
The framework employs two distinct formalisms to capture different aspects of the system:
- Timed Input Output Automaton (TIOA): Used to describe the complete behavior of the specification. TIOAs extend standard automata with clock variables and timing constraints on transitions.
- Message Sequence Charts (MSC): Used to define the "test purpose." MSCs are intuitive graphical representations of interactions between system components.
A key step in the pipeline is the automatic transformation of the MSC test purpose into a TIOA format. This ensures that both the specification and the testing goals are represented in a unified mathematical framework.
Optimization: Clock Minimization
To address the computational overhead of timing variables, the author implements clock minimization algorithms. By identifying and removing redundant or inactive clocks, the complexity of the resulting model is significantly reduced without losing behavioral accuracy. This step is critical for making the subsequent generation phases scalable for non-trivial systems.
Synchronous Product and Grid Sampling
The specification TIOA and the test purpose TIOA are merged into a single Synchronous Product. This product represents the subset of the system's behavior that is relevant to the specific test goal.
To handle the continuous nature of time, the Synchronous Product is discretized into a Grid Automaton. The sampling granularity is carefully chosen (typically $1/(n+1)$ where $n$ is the number of clocks) to ensure that timing faults remain detectable in the discrete model. This transformation converts a continuous-time reachability problem into a graph traversal problem.
Test Suite Generation
The final test suite is generated by traversing the Grid Automaton using strategies such as "all-paths" or "all-states." The framework produces a sequence of inputs and expected outputs with specific timing windows. These test cases are designed to be "self-evident" and are structured for easy translation into the industrial standard TTCN.
Experimental Evaluation
The methodology was implemented in C++ and evaluated against several real-time benchmarks. The results demonstrate that the test-purpose-driven approach successfully limited the state space to manageable levels:
| System Name | Number of Grid Automaton States | Number of Generated Test Cases |
|---|---|---|
| 2-digit Telephone System | 163 | 138 |
| 10-digit Telephone System | 3,707 | 1,563 |
| Multimedia System | 297 | 259 |
| Synchronization System | 208 | 89 |
In the case of the 10-digit telephone system, the framework managed thousands of states to produce a concise suite of 1,563 test cases, proving the effectiveness of the filtering approach.
Conclusion
This research provides a robust framework for automating the generation of timed test suites. By combining the intuitive nature of MSCs with the formal power of TIOAs, and employing clock minimization and grid sampling, the method produces readable and relevant test cases. While current limitations include a simplified MSC grammar, future work aims to support the full MSC-2000 standard and refine fault coverage metrics to further optimize test suite size.
Summary updated