Abbreviations, used in manual:
QG - Quality Gates
This manual will guide you on how to create a Script of type "SQL Query".
Follow the next steps:
1. In the QG module, in the left side menu, under specific Project, go to the “Scripts” component:
Click “Add Script” button:
2. Fill in all required fields - See details in manual Quality Gates, Scripts:
- Name - Script`s name.
- Description - Describe the Script purpose.
Severity - The impact level of a script failure
Tags - Variable can be related to appropriate Tag(s).
- Script Type - In our case we'll choose "SQL Query":
-
Data Source Name - select a Data Source from the list.
- Return type (*Optional) - chose "Success" or "Failure".
- Success Message - This value will be returned in case of successful Script termination.
- Error Message - This value will be returned in case of the Script's failure.
Script Code - insert required SQL query. If the Return Type is defined as Success/Failure, ensure the script's result corresponds to a true or false condition, along with the return value.
For example: The result of the query below is the number 65482174.
select * from income where income = 30There are 4 different cases:
1. Define Success as the Return Type and 65482174 as the Return Value. Result of the Script will be Success:
2. Define Success as the Return Type and 65482170 as the Return Value. Result of the Script Will be Failure:
3. Define Failure as the Return Type and 65482174 as the Return Value. Result of the Script will be Failure:
4. Define Failure as the Return Type and 65482170 as the Return Value. Result of the Script will be Success:
{;} Set Variables - the value of a Variable(s) that is already in use within that specific Script, can be modified:
Comments
0 comments
Please sign in to leave a comment.