Testing shared libraries

Component Testing for C

In order to test a shared library, you must create a test node containing the .ptu component test script that uses the library, and a reference link to the library.

After the execution of the test node, the runtime analysis and component test results are located in the application node.

To test a shared library:

  1. Add the library to your project:

    1. Right-click a group or project node and select Add Child and Library from the popup menu.

    2. Enter the name of the Library node

    3. Right-click the Library node and select Add Child and Files from the popup menu.

    4. Select the source files of the shared library.

  2. Run the Component Testing wizard as usual on the source file of your library. This creates a test node containing the test scripts and the source file.

  3. Delete the source file from the test node.

  4. Create a reference to the shared library in the test node:

    1. Right-click the application or test node that will use the shared library and select Add Child and Reference from the popup menu.

    2. Select the library node and click OK.

  5. Build and execute the test node.

Example

An example demonstrating how to test shared libraries is provided in the Shared Library example project. See Example projects for more information.

Related Topics

Using shared libraries | Profiling shared libraries