Perform AI-powered test steps
The AI Command Assistant can navigate the device screen like a user. Phrase your prompts like you would when describing a test step to a manual tester.
To have the test interact with the application, you no longer need to identify object locators or learn a scripting language. The AI Assistant understands natural language like "select London as travel destination." The assistant interprets your instructions accordingly as button clicks, menu selections, typing values in fields, and so on. The prompt is then included as the value for the Prompt parameter in the AI Command command.
For examples and limitations, see Best practices for working with the AI Command
To add the AI Command to a test:
To be able to add the AI Command, you need to open a device.
-
In the left sidebar, on the Commands tab, click and drag or double-click the AI Command command to add it to the test editor.
-
To enter the action or validation, do one of the following:
-
To enter the action or validation directly, double-click the field in the test editor.
-
Click the AI assistant button
to open the AI assistant pane.In the field at the bottom, describe the logical goal you want the AI Command to perform, such as "Log in as Joe with password 123."
-
-
(Optional) To include variables in your AI Command:
-
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 Command inline
-
In the Prompt field in the AI Command parameters tab if Usage is set to Constant;
if Usage is set to Variable, the variable picker opens immediately.
Example of existing variable use: Log in as ${username} with password ${pwd}
-
-
To create a variable in the AI Assistant, enter a name in ${variable-name} format and provide an initial value when prompted.
Example of variable creation: A request such as Open the ${app} app. asks you for a value and creates the app variable. -
To create a variable from a value on the screen at runtime, tell the assistant the new variable name and describe its value. For example:
Put the maximum temperature shown on the screen into ${max_temp}.Identify the exchange rate shown and save it to ${rate}.Get the value of the account balance and put it into ${balance}.
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 instructions as it understood them and adds steps to the test editor.
Verify that the Assistant interpreted the command as intended.- 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.
-
(Optional) Add more AI commands and repeat the process.
-
(Optional) To copy the suggested AI Command prompt to the clipboard, hover over the text in the AI Assistant and click the Copy to clipboard button
.
Save and run the test.