Script Level Pre-Post Condition
Navigation for Pre-Post Conditions Script level screen:
Home icon > Test Development > <<Module name>> > <<Script name>> > Settings > Pre-Post Condition
Pre–Conditions for Script level – Adding a Pre-Condition
- Click on the “+ PreCondition” button.
- Upon clicking on the “+ PreCondition” button, you will be prompted to the text of the “Step Group” column.
- When clicked on any particular “Step group” in the table, a “Step Group Input Parameter” div will be displayed which is explained below.
Step Group Input Parameter div for Script level:
- NOTE 1: When you select the particular step group from the “Step Group” column; if that step group is cascaded from “Root” or a particular “Module”, it will display beside that step group as “<Step group name- Cascaded from Root>” or “<Step group name – Cascaded from <Module name>>” respectively. A div is displayed in the right section, and the header of the div will be displayed as “Step Group input parameter”.
- NOTE 2: If that particular step group is cascaded from “Root” or some “Module”, in the “Step group input parameter”, only the “Status” toggle bar can be changed accordingly.
- NOTE 3: Under the “Settings” tab, the step group that is cascaded from “Root” or a particular “Module”, the “Edit” icon under the “Actions” column will be disabled with a tooltip “Cannot edit cascaded precondition”.
- When you select the step group that is not cascaded from the “Step Group” column, a div is displayed in the right section, and the header of the div is displayed as “Step Group input parameter”.
- Below the “Step Group name”, only the “Status” toggle bar is displayed.
- On clicking the “Go To Step Group” hyperlink, it redirects to “Repository>Step Group>Library>Step Group>Steps”.
- If the particular step accepts some “parameters”, the “Input parameter” field will display below the “Status” toggle bar.
- If the particular step is returning some value, the “Assign Step Group return value to” field is displayed.
- Below the “Input parameter” field, all the steps present in that step group are displayed in serial order when clicked on the expandable-collapse icon. By default, it is in a collapsed state.NOTE 1: The “Input parameter” field is dynamic. There might be only one, or more than one, or there may be no “Input parameter” fields in the particular “Step Group input parameters” div.
NOTE 2: The “Assign Step Group return value to” field is also dynamic. If the user has selected the return step field in the “Repository > Step Group > Library > Step Group > Steps”, the “Assign Step Group return value to” field will be displayed in the “Step Group input parameters” div in the test development section.
NOTE 3: If you hover the mouse on the icon in the “Input parameter” field, it will display as a “Create as variable” tooltip at the module level.
NOTE 4: If you click on the “Create as variable” icon, a popup will be displayed with a popup header as “Create variable” and fields will be displayed like “Name”, “Value”, and ”Type” (Local, Global or Project environment) text field with “Create” and “Cancel” buttons in the bottom right corner of the popup, in the footer.
NOTE 5: If the user enters the “$” character in the “Input parameter” field, the dropdown will suggest the context menu, and the options of the context menu will be “Local”, “Global” variable, and “Project environment” variables that are created.
- The “If failed” dropdown in the “Step Group input parameters” popup is a mandatory field. Here, five options are displayed in the list. You can select one of the options, they are:A. Mark this step as Failed and continue script execution: Here, the step is marked as failed, but it will continue the execution of all the scripts until the end. (This option is selected by default).
B. Mark this step as a Warning and continue script execution: Here, the step is marked as a warning but it will continue the execution of all the scripts until the end.
C. Mark this step as Failed and stop script execution: Here, the step is marked as failed, and it will stop the execution for all the upcoming scripts.
D. Mark this step as Failed and stop current module execution: Here, the step is marked as failed, and will stop that particular module execution.
E. Mark this step as Failed and stop complete execution: Here, the step is marked as failed and will stop the whole execution process.
- The “Status” toggle bar will be present in the “Step Group Input Parameter” popup.
Here, you can change the toggle bar to either “Enabled” or “Disabled”.i. Enabled: When enabled in the “Steps” screen, the user can see this particular step group under the “Precondition” section in the “Steps” dropdown and it will be considered for execution. (By default, it will be “Enabled”).
ii. Disabled: When disabled in the “Steps” screen, this particular step group is not displayed under the “Precondition” section in the “Steps” dropdown and it will not be considered for execution.
- Add: Upon clicking on the “Add” button, the selected Step Group will be added as a precondition in the table of Pre Conditions.
- Cancel: Upon clicking on the “Cancel” button, it will cancel the operation and close the div.
Columns present under the Pre-Conditions table for Script level:
- Step Group: This column displays the name of the step group selected in the searchable dropdown list of the Step group text field.
- If Failed: This column displays the “If failed” option as selected under the “If failed” dropdown in the “Step Group Input Parameter” popup, as static text in the table.
- Status: This column displays the “Enabled” or “Disabled” as selected in the “Step Group Input Parameter” popup, as static text in the table.
- Actions: Under this column, there are two icons and the icons are displayed only when hovered with the mouse of the particular step group. The icons are detailed below:i. Edit: Upon clicking on the “Edit” icon, it will open a popup and the label of the popup will be “<Edit-Step Group Input Parameter>”. Here you can update the changes, in the steps.
ii. Delete: Upon clicking on “Delete”, it will delete the pre-condition from the table. And it will display a “Success” banner with the message “<<Pre Condition name>> pre condition is deleted” below the tabs section with the “Dismiss” button on the right side of the banner. When clicked on the “Dismiss” button the banner is closed.
NOTE: The execution order of the “Preconditions” present under the “Script level Pre conditions” tab are: –
- <<Step group name – Cascaded from Root Module>>
- <<Step group name – Cascaded from <Module name>>>
- <<Step group name – Cascaded from <Submodule name>>>
- Script level step group.
Post–Conditions for Script level – Adding Post-Condition
- Click on the “+ Post Condition” button.
- Upon clicking on the “+ Post Condition” button, you will be prompted to the text field of the “Step Group” column.
- When clicked on any particular “Step group” in the table, a “Step Group Input Parameter” div is displayed which is explained below. (Refer: Step Group Input Parameter div for Script level)
Step Group Input Parameter div for Script level:
- When you select the particular step group from the; “Step Group” column, if that step group is cascaded from “Root” or a particular “Module”, it will display beside that step group as “<Step group name- Cascaded from Root>” or “<Step group name – Cascaded from <Module name>>” respectively. A div is displayed in the right section, and the header of the div will be displayed as “Step Group input parameter”.NOTE: If that particular step group is cascaded from “Root” or some “Module”, in “Step group input parameter”, the “Cascade” checkbox is displayed which will be disabled, but the “Status” toggle-bar can be changed accordingly.
- When you select the step group which is not at all cascaded, from the “Step Group” column a div is displayed in the right section, and the header of the div will be displayed as “Step Group input parameter”.
- Below the “Step Group name”, only the “Status” toggle bar is displayed.
- On clicking the “Go To Step Group” hyperlink, it will redirect the user to “Repository>Step Group>Library>Step Group>Steps”.
- If the particular step accepts some “parameters”, the “Input parameter” field is displayed below the “Status” toggle bar.
- If the particular step is returning some value, the “Assign Step Group return value to” field is displayed.
- Below the “Input parameter” field, all the steps present in that step group are displayed in a serial order if clicked on the expandable-collapse icon. By default, it will be in a collapsed state.NOTE 1: The “Input parameter” field is dynamic. There might be only one, or more than one, or there may be no “Input parameter” fields in the particular “Step Group input parameters” div.
NOTE 2: The “Assign Step Group return value to” field is also dynamic. If the user has selected the return step field in the “Repository > Step Group > Library > Step Group > Steps”, the “Assign Step Group return value to” field will be displayed in the “Step Group input parameters” div in the test development section.
NOTE 3: If you hover the mouse on the icon in the “Input parameter” field, it will display as a “Create as variable” tooltip at the module level.
NOTE 4: If you click on the “Create as variable” icon, a popup will be displayed with a popup header as “Create variable” and fields will be displayed like “Name”, “Value”, and” Type” (Local, Global or Project environment) text field with “Create” and “Cancel” buttons in the bottom right corner of the popup, in the footer.
NOTE 5: If the user enters the “$” character in the “Input parameter” field, the dropdown will suggest the context menu, and the options of the context menu will be “Local”, “Global” variable, and “Project environment” variables that are created.
- The “If failed” dropdown in the “Step Group input parameters” popup is a mandatory field. Here, seven options are displayed in the list. You can select one of the options, they are:A. Mark this step as Failed and continue script execution: Here, the step is marked as failed, but it will continue the execution of all the scripts until the end. (This option is selected by default).
B. Mark this step as a Warning and continue script execution: Here, the step is marked as a warning but it will continue the execution of all the scripts until the end.
C. Mark this step as Failed and stop script execution: Here, the step is marked as failed, and it will stop the execution for all the upcoming scripts.
D. Mark this step as Failed and stop current module execution: Here, the step is marked as failed, and will stop that particular module execution.
E. Mark this step as Failed and stop complete execution: Here, the step is marked as failed and will stop the complete execution process.
- The “Status” toggle bar will be present in the “Step Group Input Parameter” popup.
Here, you can change the toggle bar to either “Enabled” or “Disabled”.i. Enabled: If enabled in the “Steps” screen, the user can see this particular step group under the “Post-condition” section in the “Steps” dropdown and it will be considered for execution. (By default, it will be “Enabled”).
ii. Disabled: If disabled in the “Steps” screen, this particular step group is not displayed under the “Post-condition” section in the “Steps” dropdown and it will not be considered for execution.
- Add: Upon clicking on the “Add” button, the selected Step Group will be added as a post-condition in the table of Post Conditions.
- Cancel: Upon clicking on the “Cancel” button, it will cancel the operation and close the div.
Columns present under the Post-Conditions table for Script level:
- Step Group: This column displays the name of the step group selected in the searchable dropdown list of the Step group text field.
- If Failed: This column displays the “If failed” option as selected under the “If failed” dropdown in the “Step Group Input Parameter” popup, as static text in the table.
- Status: This column displays the “Enabled” or “Disabled” as selected in the “Step Group Input Parameter” popup, as static text in the table
- Actions: Under this column, there are two icons and the icons are displayed only when hovered by the mouse of the particular step group. The icons are detailed below:a. Edit: Upon clicking on the “Edit” icon, it opens a popup and the label of the popup is “<Edit-Step Group Input Parameter>”. Here you can update the changes in the steps.
b. Delete: Upon clicking on “Delete”, it will delete the postcondition from the table. And it will display a “Success” banner with the message “<<Post Condition name>> postcondition is deleted” below the tabs section with the “Dismiss” button on the right side of the banner. When you click on the “Dismiss” button the banner will be closed.
NOTE: The execution order of the “Post conditions” present under the “Script level Post conditions” tab are: Script level step group.
- <<Step group name – Cascaded from <Submodule name>>>
- <<Step group name – Cascaded from <Module name>>>
- <<Step group name – Cascaded from Root Module>>