Create AI-powered validations
With the help of the AI Validation Assistant, you can check whether a scenario is true or false, or whether certain information is present or absent on the device screen. The AI Validation Assistant helps you turn your question into a valid pass or fail validation that you can then include as a value for the Validation parameter in the AI Validation command. The answer results in a pass or fail value.
To add a validation:
To add an AI Validation, open a device.
-
In the left sidebar, select the AI tab.
-
Click and drag or double-click the Validation command to the test editor.
-
Double-click the Validation in the test editor to enter the validation.
-
In the AI Validation assistant pane, at the bottom, type a validation question.
-
(Optional) Include one or more variables in your validation. To learn how to create secured variables, see Configure test variables.
-
To insert an existing variable, type ${ and select it from the list. You can do this in the AI Validation assistant pane, in the Validation field on the Parameters tab when Usage is set to Constant, and when editing the AI Validation step inline in the test editor. If Usage is set to Variable on the Parameters tab, typing ${ does not open the variable picker. To insert a secured variable, type its full name, for example, ${key}. Values of variables entered as Secured String parameters are not shown in reporting steps. For example:
Is the API key set to ${key}?If the Save button is visible, put yes into ${isVisible}, else put no into ${isVisible} -
To create a variable, describe its value and in which variable to store it in the format ${variable-name}. You can use the variables in later validation steps. For example:
Put the maximum temperature into ${max_temp}.
Put the minimum temperature into ${min_temp}.
Is ${max_temp} larger than ${min_temp}?
-
-
To submit your validation, click the Send button
.At the top of the AI Validation assistant pane, the assistant presents you with the answer.
The AI Assistant highlights the pertinent UI elements on the device screen. To see an explanatory tooltip, hover the mouse over the highlight. A red highlight indicates a failed validation, green indicates passed, and purple can indicate secondary evidence.
-
(Optional) To include variables in your AI Validation:
-
To use an existing test variable, type ${ and select a variable. You can open the variable picker this way in several locations:
-
In the AI assistant dialog
-
In the Test editor when editing the AI Validation inline
-
In the Validation field in the AI Validation parameters tab if Usage is set to Constant;
if Usage is set to Variable, the variable picker opens immediately.
Example of existing variable use: Verify that ${username} is logged in
-
-
To create a variable in the AI Assistant, enter a name in ${variable-name} format and provide an initial value when prompted.
Values of variables entered as Secured String parameters are not shown in reporting steps.
To learn more about variables in AI Scriptless, see Configure test variables.
-
-
The Assistant confirms by repeating the validation and adds it in the test editor. Verify that the Assistant interpreted the validation as intended.
- While answering a validation question, the AI Validation Assistant might also perform calculations. If your input could be more specific, the Assistant asks for details or suggests an improved phrasing. For examples, see AI commands FAQ.
- If it needs time to process, the Assistant will say "Working on it..."
- If needed, cancel the processing by starting to type another prompt or by clicking the Stop button.
- If the result is satisfactory, click Apply.
- (Optional) To copy the suggested text to the clipboard, hover over the text and click the Copy to clipboard button
next to the text.
Save and run the test.