Default language.

SQL Select


The SQL Select element is used to issue a SELECT statement against a database in the environment where the Total Test Scenario is executed. The name of the database and the establishment of a connection are handled by the selected environment in the execution context. The SQL Select statement only specifies the SQL.

Add SQL Select to the Test Scenario by dragging it from the tool palette. This opens the Insert a new SQL Select element popup. Here are the fields available when setting up this element:

  • ID - a unique name used to refer to output from this element to other elements in this Test Scenario. Reference to this ID by using the format ${myid}.
  • Description - an optional description of the Test Element.
  • Max rows - maximum number of rows to select.
  • SQL Statement - the SQL statement itself supports variable substitution and values from earlier in the test Scenario that can be referenced with ${<id.path>}
  • OK / Cancel - click on OK to save your element.

Important

  • The SQL Select statement has one limitation: You need to select a number of named columns in the SELECT statement in the form SELECT COL1,COL2,COL3 FROM.... in order to be able to reference the column values later in the test. This means that SELECT statements such as SELECT * FROM..., SELECT FROM... and SELECT MAX(..) FROM.. are not supported. You can use SELECT statements like SELECT * FROM… to get a view of the data and column names when you are creating a test scenario, but the column names need to be specified in order for following elements to be able to reference the data.
  • When developing your test scenario and referencing a SQL Select element from an Iterate element, the Iterate user interface will show as many Row elements with the same column names and empty values as specified with Max rows. During development time, it is unknown how many rows/records and values will be returned at execution time. Therefore, the user interface indicates that there can be multiple rows/records from the SQL Select, thus displaying multiple rows. At execution time there might be 0, 1 or multiple rows returned by the SQL SELECT statement.


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*