Integrated, simulated and additional files

Component Testing for C

When creating a Component Testing test node for C and Ada, the Component Testing wizard offers the following options for specifying dependencies of the source code under test:

  • Integrated files

  • Simulated files

  • Additional files

Integrated Files

This option provides a list of source files whose components are integrated into the test program after linking.

The Component Testing wizard analyzes integrated files to extract any global variables that are visible from outside. For each global variable the Parser declares an external variable and creates a default test which is added to an environment named after the file in the .ptu test script.

By default, any symbols and types that could be exported from the source file under test are declared again in the test script.

Simulated Files

This option gives the Component Testing wizard a list of source files to simulate—or stub—upon execution of the test.

A stub is a dummy software component designed to replace a component that the code under test relies on, but cannot use for practicality or availability reasons. A stub can simulate the response of the stubbed component.

The Component Testing parser analyzes the simulated files to extract the global variables and functions that are visible from outside. For each file, a DEFINE STUB block, which contains the simulation of the file's external global variables and functions, is generated in the .ptu test script.

By default, no simulation instructions are generated.

Additional Files

Additional files are merely dependency files that are added to the Component Testing test node, but ignored by the source code parser. Additional files are compiled with the rest of the test node but are not instrumented.

For example, Microsoft Visual C resource files can be compiled inside a test node by specifying them as additional files.

You can toggle a source file from under test to additional by using the Properties Window dialog box.

Related Topics

Component Testing Wizard