Home | Previous Page | Next Page   Debugging and Testing DataBlade Modules on Windows > Debugging a DataBlade Module >

Editing Unit Test Files

Before you start debugging, edit the unit test files to add the SQL statements necessary to debug your DataBlade module.

When you generate unit tests for a DataBlade module, BladeSmith generates the files listed in the following table in the src\tests directory.

Test Name
Purpose
Setup.sql
Optionally initializes the database. You can add SQL statements to create and populate the tables necessary for your debugging tests.

If you specify this file as your initialization file in the Configure DBDK Visual C++ Add-In dialog box, IfxQuery automatically runs this file after it creates a new database.

Routine.sql
Tests the user-defined routine. You can add SQL statements or modify the sample data for the routine. Use this file if you are debugging udr.c.

IfxQuery runs this file if you click Debug DataBlade Module with this file in the active window.

Opaque.sql
Tests the support routines for each opaque data type. You can add SQL statements or modify the sample data for each support routine. Use this file if you are debugging Opaque.c or OpaqueServer.cpp.

IfxQuery runs this file if you click Debug DataBlade Module with this file in the active window.

Cleanup.sql
Optionally deletes and drops tables and data in your test database.

IfxQuery runs this file if you click Debug DataBlade Module with this file in the active window.

When you edit unit test files, add SQL statements in the areas marked with TEST comments. This ensures that your statements are merged when you regenerate unit tests with BladeSmith.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]