![]() |
![]() |
![]() |
![]() |
![]() |
TTCN Test Logs in MSC Format
The TTCN standard conformance log, though it is a relatively complete logging format, has a few drawbacks for some purposes:
- The conformance log is very detailed.
- The conformance log requires knowledge of TTCN and its semantics.
- The conformance log is not always particularly easy to read.
In order to get a more high-level view, the log must either be filtered or another approach needs to be taken - in this case the MSC log format. The current version of the TTCN Suite has support for an additional logging mode, to generate MSC/PR standard conformant logs - automatically saved in files and also directly to the MSC Editor.
For limitations in the MSC logging, see "MSC Logging" on page 42 in chapter 1, Compatibility Notes, in the Release Guide.
MSC Logging Applications
There are several applications of MSC logging. Here are some:
- Test reviews
- Test result recreation
- Test re-engineering
- If MSC traces are being used to generate test cases, the tests can be modified at the MSC level. A modified MSC can be used to generate a new tests. For instance - a test written in TTCN generates an MSC. At a review of the MSC logs a new scenario may be identified. The MSC can be changed to reflect the new scenario, and the MSC can be translated back to TTCN.
MSC Logging Modes
There are three major modes of logging, which can be toggled between the test cases. It is not possible to change the logging mode in a running test case since that would cause an inconsistency in the MSC file. The modes are:
- None
- No MSC logs are generated at all. This mode improves performance somewhat compared to the other modes. For best performance, the MSC generation code can be entirely disabled. For more information see "Compiling an ETS with MSC Generation" on page 1335.
- Composed
- MSC generation of externally visible events of the ETS. This is suitable for test regeneration and for re-viewing test results. The performance is better than Decomposed mode. The generated MSC views the ETS as a set of PCOs that interact with a IUT. The ETS is not visible as one particular instance. Some relative timing information may be lost in this mode.
- Decomposed
- MSC generation of externally visible and internal events of the ETS. This is the most detailed mode and it produces MSC events for almost all actions of the ETS. The purpose of the MSCs that are generated is to visualize the internal events and configuration of the ETS, and for test case debugging purposes.
MSC Instances Generated
Events Logged
Compiling an ETS with MSC Generation
The ETS Generator can be compiled for a workstation or an embedded environment. Some modifications need to be done for applying it in the embedded environment if it lacks a file system. By default the tool will allow for any of these combinations at code generation time. For more information see "MSC Generation Modifications" on page 1336.
Definitions that may be changed to customize the MSC generation:
If defined, no message values are displayed - this may make the ETS more efficient and the MSC logs more readable when using complex messages.
MSC Generation Modifications
Modifications to the MSC generation for running on an embedded environment include:
- The MscAppendPREvent function can be modified to transfer the PR events via any type of uni-directional communications device. It is recommended to create another definition similar to the MSC_MSCE_MODE or MSC_FILE_MODE and complement the mscgen.c file with these.
- Any place where MSC_FILE_MODE or MSC_MSCE_MODE is used should be having a new definition for the new logging mode.
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |