Printer FriendlyEmail Article Link

iTest: How the "Use prepared statement" option works in iTest database client session


  • iTest
  • External database (MYSQL)


  • Prepared statements are statements that include parameter references that will be replaced at runtime with the parameter values.
  • In database client test case step, we can specify that the SQL statement is a prepared statement.


  1. In the Database Client execute Properties > Execute Step Properties section, check the Use prepared statement check box.

  2. In the Prepared Statement Parameters properties group, define one parameter for each ? Character in the query string.


               Note: The order of the parameters in the list is important because the? characters in the prepared statement are substituted in the listed order.

For example:

  •          Instead of using a query like: select * from testreport where id=1 and result= “Fail”,  we can use a prepared statement as select * from testreport where id=? and result=?
  •         Where ? Characters in the prepared statement are replaced at runtime with values that we specified for a set of prepared statement parameters.







Product : iTest Enterprise