Skip to content

How do I set the "timeout" for SQL Queries in the test run

This example demonstrates how you can set the timeout and execute a query.

In the solution shown below, you set the timeout using the "dbSetTimeout" command and the context i.e., the tunnel & database names are provided using the "dbSetContext" command and the query is executed using the "dbExecuteQuery" command in the HICC application.

Solution:

# Command Target Value
Start of a dbCONNECT Block
1 dbBlockOpen

To set the "timeout" for DB Queries
2 dbSetTimeout 30
To specify to Worksoft SaaS the "database" and "dbCONNECT tunnel" names
3 dbSetContext Worksoft SaaStrainingTunnel eureqa_postgres_ipc
To execute the DB Query
4 dbExecuteQuery select zip.zipCode from eureqaref.Ref_US_Zipcode zip join eureqaref.Ref_US_State stat on stat.stateCode = zip.stateCode where lower(stat.stateName) = lower('California') zipcodes
End of a dbCONNECT Block
5 dbBlockEnd

Tips, Tricks, Gotchas & Best Practices:  

  • It is a best practice to set the timeout before you execute a db query
  • The timeout specified is in seconds


Feedback and Knowledge Base