background image
<< Component Testing for C | Initial and Expected Value Settings >>
<< Component Testing for C | Initial and Expected Value Settings >>

Simulated Files

Automated Testing
Both the instrumented application and the test driver provide output data which is
displayed within Test RealTime.
Integrated, Simulated and Additional Files
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.
127