Generates GUI test workflows from natural language prompts.
More...
#include <test_workflow_generator.h>
Generates GUI test workflows from natural language prompts.
This class uses pattern matching to convert user prompts into structured test workflows that can be executed by GuiAutomationClient.
Example prompts:
- "Open Overworld editor" → Click button, Wait for window
- "Open Dungeon editor and verify it loads" → Click, Wait, Assert
- "Type 'zelda3.sfc' in filename input" → Click input, Type text
Usage:
if (!workflow.ok()) return workflow.status();
for (const auto& step : workflow->steps) {
std::cout << step.ToString() << "\n";
}
Generates GUI test workflows from natural language prompts.
absl::StatusOr< TestWorkflow > GenerateWorkflow(const std::string &prompt)
Generate a test workflow from a natural language prompt.
Definition at line 72 of file test_workflow_generator.h.
◆ TestWorkflowGenerator()
yaze::cli::TestWorkflowGenerator::TestWorkflowGenerator |
( |
| ) |
|
|
default |
◆ GenerateWorkflow()
absl::StatusOr< TestWorkflow > yaze::cli::TestWorkflowGenerator::GenerateWorkflow |
( |
const std::string & |
prompt | ) |
|
Generate a test workflow from a natural language prompt.
- Parameters
-
prompt | Natural language description of desired GUI actions |
- Returns
- TestWorkflow or error if prompt is unsupported
◆ MatchesOpenEditor()
bool yaze::cli::TestWorkflowGenerator::MatchesOpenEditor |
( |
const std::string & |
prompt, |
|
|
std::string * |
editor_name |
|
) |
| |
|
private |
◆ MatchesOpenAndVerify()
bool yaze::cli::TestWorkflowGenerator::MatchesOpenAndVerify |
( |
const std::string & |
prompt, |
|
|
std::string * |
editor_name |
|
) |
| |
|
private |
◆ MatchesTypeInput()
bool yaze::cli::TestWorkflowGenerator::MatchesTypeInput |
( |
const std::string & |
prompt, |
|
|
std::string * |
input_name, |
|
|
std::string * |
text |
|
) |
| |
|
private |
◆ MatchesClickButton()
bool yaze::cli::TestWorkflowGenerator::MatchesClickButton |
( |
const std::string & |
prompt, |
|
|
std::string * |
button_name |
|
) |
| |
|
private |
◆ MatchesMultiStep()
bool yaze::cli::TestWorkflowGenerator::MatchesMultiStep |
( |
const std::string & |
prompt | ) |
|
|
private |
◆ BuildOpenEditorWorkflow()
TestWorkflow yaze::cli::TestWorkflowGenerator::BuildOpenEditorWorkflow |
( |
const std::string & |
editor_name | ) |
|
|
private |
◆ BuildOpenAndVerifyWorkflow()
TestWorkflow yaze::cli::TestWorkflowGenerator::BuildOpenAndVerifyWorkflow |
( |
const std::string & |
editor_name | ) |
|
|
private |
◆ BuildTypeInputWorkflow()
TestWorkflow yaze::cli::TestWorkflowGenerator::BuildTypeInputWorkflow |
( |
const std::string & |
input_name, |
|
|
const std::string & |
text |
|
) |
| |
|
private |
◆ BuildClickButtonWorkflow()
TestWorkflow yaze::cli::TestWorkflowGenerator::BuildClickButtonWorkflow |
( |
const std::string & |
button_name | ) |
|
|
private |
◆ NormalizeEditorName()
std::string yaze::cli::TestWorkflowGenerator::NormalizeEditorName |
( |
const std::string & |
name | ) |
|
|
private |
The documentation for this class was generated from the following file: