Skip to main content

SQL Testing with AIQ

SQL Testing with AIQ

Use SQL testing in AIQ when a scenario must validate database state, prepare controlled test data, or confirm that an application workflow created the expected records. Keep these tests focused on non-production data unless the activity has been explicitly approved.

  • Use a least-privilege database account that can access only the schema and operations required by the test.
  • Keep connection details in secured AIQ configuration or environment-specific variables instead of hard-coding credentials in the scenario.
  • Run read-only validation queries whenever possible. Use write, update, or delete statements only for controlled setup and cleanup steps.
  • Parameterize test data with DPLs or variables so the same scenario can run safely across environments.
  • Validate expected row counts, field values, and error handling before using the scenario in a scheduled run.

Validation workflow

  1. Confirm the target database, schema, and account permissions.
  2. Create or select the SQL step in the AIQ test flow.
  3. Define the query, bind any variables, and set the expected result.
  4. Run a small smoke test and review the output before increasing test volume.
  5. Clean up generated test data when the scenario requires it.

Note: Avoid using broad production queries or unrestricted database accounts for performance or functional test validation.

Last updated: October 8, 2026