1. Overview
Business rules helps to validate text field, text area and dropdown list.
Following are the Business Rules Categories:
- Correct values
- Incorrect values
- Illegal values
- Invalid values
- Boundary values
2. Understanding Business Rules in Node Configuration
Business rules helps to validate text field, text area and dropdown list. To access Business Rules button, you must first configure a node.
Perform the following:
- Navigate to the Main Canvas.
- Drag and drop the node to the Main Canvas.
- Click the each node to edit. In the Node Name text box, enter the same name as the page name or screen name.
- Upon successful node configuration, you can see all the UI elements within the feature. By default, one feature will be configured. Rename the feature.
- In the required feature, update the attributes of UI element, such as control name, control value, navigation, business rules, test data or control value and locator (XPath).
- Business Rules button will be enabled only when you select UI element types as Textbox, Text area and Dropdown list.
- Business Rules contains parameters. Let us understand the parameters in Business Rules:ParametersDescriptionRegexRegex patterns are used to search for specific types of information within text. They help define rules for matching certain patterns, such as email addresses and phone numbers. For more information on Regex Patterns, see Troubleshooting guide.minLen, maxLen and exactLenminLen, maxLen and exactLen are the parameters used to set the minimum, maximum and exact length of data to be generated and applicable only for string data.minVal and maxVal
These parameters ensure numeric inputs stay within the defined range and follow the specified step.
minVal and maxVal are used to define the minimum and maximum value of the textbox to be accepted.
The step is used to generate the boundary values for minimum and maximum values. Select the Boundary values option in the Data Generation option.
Data GenerationBy default, this option is set to Y.DataGeneration is to decide the text field or text area requires business rule.
If the value is Y, then the combinational data set will be generated in the feature file. If the value is N, then the value is passed in the userfed input (test data or parameter) during Node Configuration that will be generated in the feature file. Ensure to select all the values in the Data Generation option to generate user fed combinatorial data sets. For more information, see Configuring Combinatorial Data Generation in algoQA.
Case-sensitivityCaseSensitivity will generate the case-sensitive or case-insensitive test data as per the provided value.
case-sensitive will generate values as per the user fed input.
case-insensitive will generate combinations of upper case and lowercase letters.
String Type - Only AlphabetsHere let us generate different data types by using StringType Business Rule.
Data can be generated in different ways like only alphabets, only numeric and alphanumeric.
ShouldBDuplicateShouldBeDuplicate will generate duplicate values when the key value is Y and not generate the duplicate value when it is N.CaseConditionCaseCondition will generate the test data which contains at least one upper case or one lower case character or both in the string.QuotesAroundStringQuotesAroundString will generate the string data enclosed with quotes.SpecialCharacterThis will generate the test data which contains at least one special character in the string.Message CategoriesMessage Categories are the fields used to verify the validation messages for the negative scenarios.
For example: If user clicks on continue without entering username or email address, it will display validation error message as “Enter your email or mobile phone number”. To verify this kind of validation error messages, user can update the message categories fields.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article