Programmatically Enable or Disable Database Logging or Report Generation

Updated Jan 24, 2018

Reported In

Software

  • TestStand

Issue Details

How can I programmatically enable or disable Database and/or Report Logging in TestStand?

Solution

You can programmatically enable or disable Database Logging and/or Report Generation using the DatabaseOptions and ReportOptions Sequence File callbacks. Add the callbacks to your client sequence file and change the disable flags as follows.

Database Logging:
  1. Select Edit»Sequence File Callbacks.
  2. Select the DatabaseOptions Callback and click the Add button to add the callback to your client sequence file.
  3. Click OK to close the Sequence File Callbacks dialog box.
  4. Inside of your client sequence file, open the DatabaseOptions Callback.
  5. Insert a Statement step. Right-click and select Insert Step»Statement.
  6. For the expression, type Parameters.DatabaseOptions.DisableDatabaseLogging = True to disable Database Logging.  Type Parameters.DatabaseOptions.DisableDatabaseLogging = False to enable Database Logging.

Report Generation: 
  1. Select Edit»Sequence File Callbacks.
  2. Select the ReportOptions Callback and click the Add button to add the callback to your client sequence file.
  3. Click OK to close the Sequence File Callbacks dialog box.
  4. Inside of your client sequence file, open the ReportOptions Callback.
  5. Insert a Statement step. Right-click and select Insert Step»Statement.
  6. For the expression, type Parameters.ReportOptions.DisableReportGeneration = True to disable Report Generation.  Type Parameters.ReportOptions.DisableReportGeneration = False to enable Report Generation.

WAS THIS ARTICLE HELPFUL?

Not Helpful