Performing functional tests

When you generate functional tests, BladeSmith creates a set of files that include shell scripts and SQL scripts for testing opaque data type support routines, user-defined routines, and cast support functions. By default, these files are created in the functest subdirectory of the directory containing the BladeSmith project file.

About this task

Functional tests are generated only for the DataBlade® module objects for which you enter test data in your BladeSmith project.

Functional testing is typically an iterative process, repeated many times until the code passes all the tests. The testing process has the following general steps:

Procedure

  1. Build the shared object file while logged on as user informix.
  2. Install the DataBlade module shared object, SQL scripts, and test scripts in the $ONEDB_HOME/extend/project directory.
    See Installing a DataBlade module for more information.
  3. Log on as the informix user and start your database server with the oninit command.
    See the HCL OneDB™ Administrator's Guide for more information.
  4. Create a test database.
    See the HCL OneDB DB-Access User's Guide for more information.
  5. Register the DataBlade module by using BladeManager.
    See Register a DataBlade module for more information.
  6. If you are replacing an existing shared object, shut down and restart the database server with the onmode -k and oninit commands.
    See Replace a shared object file for more information.
  7. Execute the functional tests.
    See Execute functional tests for instructions.
  8. Edit the source code (if necessary).
  9. Regenerate the tests in BladeSmith (if necessary).
  10. Repeat the procedure, as necessary.