Managing the ProjectsUnderstanding Business Rules in Node Configuration

Understanding Business Rules in Node Configuration

Business rules help to validate text fields, text areas, and dropdown lists. The following are the Business Rules categories: Correct values, Incorrect values, Illegal values, Invalid values, Boundary values.

Understanding Business Rules in Node Configuration

Business rules help to validate text fields, text areas, and dropdown lists. To access the Business Rules button, you must first configure a node.
Perform the following:

Navigate to the Canvas.

Click the Add Node button to add a node into the canvas.

Click 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, assertion, business rules, test data or control value, and locator (XPath).

Select the Assertion and Business Rules button, then select the checkbox of Business Rules.

After that, it will be displayed in Node Configuration. The Business Rules button will be enabled only when you choose UI element types such as Textbox, Text Area, or Dropdown list.

Business Rules contains parameters.

Let us understand the parameters in Business Rules:

ParametersDescription
RegexRegex 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 are applicable only for string data.
minVal and maxValThese 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. Data Generation determines whether the text field or text area requires a 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 that you select all the values in the Data Generation option to generate negative test data. For more information, see Configuring Combinatorial Data Generation in algoQA.
Custom Regression TypesHere, you can generate test data using these values (invalid_boundary_illegal_incorrect ) instead of selecting the appropriate check boxes in the Data generation section. You can replace any value with NA if it is not applicable and generate test data.
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 uppercase 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, such as only alphabets, only numeric, and alphanumeric.
ShouldBeDuplicateShouldBeDuplicate 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.
Date_FormatHere, you can generate test data for a date in the formats, such as NOT SELECTED /dd-mm-yyyy /mm-dd-yyyy /yyyy-mm-dd /yyyy-dd-mm
Message CategoriesMessage Categories are the fields used to verify the validation messages for the negative scenarios. For example: If a user clicks Continue without entering a username or email address, it will display a validation error message as "Enter your email or mobile phone number". To verify this kind of validation error messages, the user can update the message categories fields.