Using Command line Component Testing for C, Ada and C++

Command Line Interface

Use Component Testing for C and Ada and Component Testing for C++ to test individual components of your C, C++ and Ada source code.

To perform component testing on C, C++ or Ada source code:

  1. First, set up the necessary environment variables. See Setting Environment Variables.
  2. Generate a set of test script templates based on your source files by using the Source Code Parser. See corresponding Source Code Parser command line section in the Reference section.
  3. Use the generated .ptu, .otc or .otd templates to write a test script. See the Reference section for test script syntax.
  4. If you are using an .otc Contract Check script, set up an options.h header file. See Preparing an Options Header File.
  5. Compile the generated test harness source file. See Compiling the Test Harness
  6. If you are using any of the runtime analysis tools, instrument and compile the source code. See Instrumenting and Compiling the Source Code.
    Note: If not, simply compile your source code with your usual compiler.
  7. Set up the TDP configuration file, called product.h. See Preparing a Products Header File.
  8. Compile the TDP Library. See Compiling the TDP Library.
  9. Link the compiled files together to create an executable test binary. See Linking the Application.
  10. Execute the test binary. See Running the Test Harness or Application.
  11. After execution, to obtain the final test results, as well as any SCI dump information, you need to separate the output file into separate result files. See Splitting the SCI Dump File.
  12. Run the Report Generator to produce a test report. See the Reference section.
  13. Finally, launch the Graphical User Interface to view the test reports. See Opening Reports from the Command Line.

Related Topics

Using the Command Line Interface|