Rules
Rules allow to set SQL generation rules, which can be used for Test generation (see chapter Test generation). Users can define their custom SQL generation rules based on their needs. Some default rules are defined on initial setup. Dynamic rules are managed from the Test cases page via More → Dynamic rules. 
Editing a rule – edit existing rule for test generation (click on rule to edit)
Add a new rule – add a new dynamic rule for automatic test generation (click on the "New rule" button)
Parameters – used in rule generation, grouped into Default and Custom; reference them in a rule's SQL as
<name>(see chapter Parameters)
Parameters
Parameters are part of rules that are replaced by database metadata or user input to dynamically generate test cases. Default parameters are replaced by database metadata:
<db_name> - replaced with database name
<schema> - replaced with database schema name
<object> - replaced with table or view name
<column> - replaced with a single selected column name
<columns> - replaced with all (or selected) column names separated by commas. Column names are wrapped based on database syntax:
postgres, oracle, sap iq – “column”
MS SQL server – [column]
MySQL, MariaDB – `column`
<pk_columns> - replaced by primary key columns (comma separated). If primary keys are not found then the test is not generated
<forEachColumn></forEachColumn> - content between these two parameters are repeated for all (or selected) columns.
It is also possible to use parameters <column_name> and <column_data_type> in the content.
Custom parameters
Insert new parameter name into the "New parameter" field and confirm

New parameter will be displayed in the Custom group of the parameter list
This parameter can be used in rule creation and test generation
Parameters can be deleted from the list with the remove button (a confirmation is shown)
Adding/editing a rule
Click on the "New rule" button (or an existing rule to edit it)
Test case name – description which is added to all tests generated by this rule.
<parameter>will be replaced with custom parameters or metadata from the database. For example: “myschema.mytable – Full duplicates”Description – explanation for the rule
SQL template – SQL syntax with
<parameter>. The editor lists the available parameters beside it, and clicking one inserts itExpected result – expected numeric or string value from the query (can be empty).
greater than – >0
lesser than – <1000000
equal – =10
previous – >previous
conjunctions (&&, ||):
AND – >0&&>previous
OR >0||=previous
Drivers – JDBC drivers which this rule applies to
Press the "Save" button
Example rules
These are some dynamic rules that use database metadata as parameters.
Test name:
<schema>.<object>- Count of rowsRule description: Check if object has any rows inserted
Expected result: >0
SQL:
Test name:
<schema>.<object>- DuplicatesRule description: Check if object has any duplicate rows
Expected result: =0
SQL:
Test name:
<schema>.<object>- NULL columnsRule description: Check if object has any columns that are NULL in all rows
Expected result: empty string – leave empty
SQL:
Deleting existing rules
Find the rule you want to delete and click on it
Click the "Delete" button
