Interactive Commands
/explore
Create and execute a test file
Description
The /explore
command is used to execute a single step in a test file and add it to a specified file. This command generates and performs steps in an interactive way while creating a test file.
/explore
is the default command sent to TestDriver when no command is provided.Usage
Example usage
This command creates the command step(s) necessary to add an item to the shopping cart in the specified test file, executing the generated command(s) after writing them into the test file. If there are intermediate steps to be taken, they’re added to the test file as well.
In this case, the user wasn’t logged in, so the AI will ‘undo’ the steps it thought it should take, and add steps to log in first.
Behavior
- TestDriver will generate an idea to complete the task, try to execute it, and add the steps to the test file.
- The steps will be executed in the order generated.
- If the steps are successful, they’re added to the test file.
- If the steps fail, TestDriver will attempt to fall back to AI, undo the last step and provide an explanation of what went wrong. The AI will retry the step with new commands.
- If the commands are successful, the program will output the results and exit with code
0
. - If any failures occur during the test, the program will output the errors and exit with code
1
.
Protips
- Use descriptive prompts for higher success with generating test steps with
/explore
. - Use
/explore
multiple times in succession to build a comprehensive test file.
Gotchas
- The AI will retry 3 times if it can’t complete the task.
Notes
- The
/explore
command is ideal for creating test files in an interactive session.