T2C Framework

From ISP_RAS
Jump to: navigation, search

The T2C ("Template-to-Code") technology is designed for development of the "normal"-quality tests and provides higher level framework on top of the TETware Lite test harness.

For now, this page describes T2C 1.x only. Note that T2C was completely redesigned and rewritten in version 2.0 while remaining mostly backward-compatible with 1.x versions. See Template2Code project at SourceForge for the latest versions of T2C 2.x.

Contents

Overview of T2C (versions 1.x)

There are the following tools and utilities in the framework (see "T2C: Getting Started" for a detailed description):

  • ReqMarkup plugin for KompoZer/Nvu. This plugin provides support for marking up the requirements in the documentation and generating a T2C file template.
  • C code generator to create C code of the tests from T2C files.
  • ReqTools script for processing the marked-up documentation in a browser (generation of requirement catalogue etc.).

Once the requirements have been marked up in the documentation, ReqMarkup generates a template for the test in special T2C format. Then the test developer completes the T2C file by writing actual code of the tests (plain C with "holes" for parameter substitution and with calls of T2C API). The final C code of the tests and necessary makefiles are automatically generated from the T2C files.

T2C is built upon TET API and provides higher level API (macros and functions) for writing tests.

The distribution also contains the following files:

  • tet_code - definition of TIME_EXPIRED test result code;
  • tetexec.cfg - test execution parameters for TETware Lite test harness.

See TETware User Guide for a detailed description of these kinds of files.

Key features

  • Automatic generation of test purpose functions for each parameter set based on a test template ("a document with holes"). Test development is faster. The generated C code is structured. It is clear, which interfaces are tested in a particular test purpose and which values of the parameters are used in this test purpose.
  • Requirement checks are linked to the specific places in the documentation. Requirement text (perhaps reformulated to improve readability) is output to the TET journal in case of failure. So during analysis of the TET journal it is easier to figure out what happened. Coverage analysis is also easier. (Each requirement has a unique ID which is output to the journal when the requirement is checked.)
  • Automatic generation of common TET support code: defining TET structures (e.g. tet_testlist) in a consistent way etc.
  • Requirement (assertion) checks via special macros and functions, more convenient than using bare TET API.
  • Each test (test purpose) is executed in a separate process and thus it generally has far less effect on the other tests.
  • Maximum execution time can be specified. This can be useful if some tests may hang. (If they do, at least other tests will have a chance to be executed.) Hence the TIME_EXPIRED result code.
  • Both global and per-test resource cleanup support.
  • Support for building a test executable that does not depend on TET features at all (no change in the code of the test required). This can be useful, for example, to debug the test or to obtain more data about the behaviour of the tested interfaces in case of failure.

Downloads

The latest stable version of T2C framework can be downloaded from this page.

Getting Started

Please read "T2C: Getting Started" tutorial to see how to properly set up and use the T2C tools in test development. (The index of the tutorial is in index.html.)

The examples described in this tutorial are from the LSB Desktop-T2C test suite.

Bug Reporting

If you have found a bug, please send us an e-mail to <linux@ispras.ru>.


Copyright (C) 2007 The Linux Foundation.
The versions 1.x of T2C tools were developed by ISPRAS <linux@ispras.ru> for The Linux Foundation.

Personal tools