Skip to content

Commit 460a221

Browse files
0xrinegadeclaude
andcommitted
feat: add automated QA testing infrastructure for TUI
Implement comprehensive programmatic testing framework for chat interfaces: Core Components: - src/services/qa_agent_service.rs: Automated testing orchestration - src/services/tui_test_agent.rs: TUI interaction testing agent - src/services/visual_layout_validator.rs: Layout verification - src/services/chat_ui_test_scenarios.rs: Test scenario definitions - src/utils/agent_chat/programmatic_chat.rs: Headless chat interface Features: - Programmatic chat interaction without human input - Screenshot-based visual regression testing - Automated bug detection and GitHub issue creation - AI-powered test analysis and suggestions - Support for both simple and advanced chat modes QA Command Integration: - osvm qa run: Execute test scenarios - osvm qa visual --screenshots: Visual testing with captures - osvm qa interactive: Manual testing mode - Category filtering: --category rpc, --category chat, etc. Testing Capabilities: - UI layout validation (positioning, borders, colors) - Command execution verification - Response quality analysis - Performance benchmarking - Cross-platform compatibility checks Integration: - Updated src/commands/qa_handler.rs with new subcommands - Enhanced src/main.rs for QA command routing - Updated src/lib.rs with config export - Modified service/module registration Documentation: - docs/Visual_TUI_Testing.md: Visual testing guide - Comprehensive inline documentation in service files Use Cases: - CI/CD automated testing - Pre-release verification - Regression detection - UX quality assurance 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 4309ef5 commit 460a221

File tree

11 files changed

+4810
-3
lines changed

11 files changed

+4810
-3
lines changed

docs/Visual_TUI_Testing.md

Lines changed: 547 additions & 0 deletions
Large diffs are not rendered by default.

src/commands/qa_handler.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ pub async fn handle_qa_command(
2222
TestCategory::Chat
2323
};
2424

25-
let create_issues = sub_m.get_flag("create-issues");
25+
let create_issues = sub_m.get_flag("create_issues");
2626
let github_repo = sub_m
27-
.get_one::<String>("github-repo")
27+
.get_one::<String>("github_repo")
2828
.map(|s| s.to_string())
2929
.unwrap_or_else(|| "opensvm/osvm-cli".to_string());
3030

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
pub mod clparse;
2626
pub mod commands;
27+
pub mod config;
2728
pub mod prelude;
2829
pub mod services;
2930
pub mod utils;

src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
319319
.await
320320
.map_err(|e| e.into());
321321
} else {
322-
return crate::utils::agent_chat::run_agent_chat_ui()
322+
// Check for test mode
323+
let test_mode = sub_matches.get_flag("test_mode");
324+
return crate::utils::agent_chat::run_agent_chat_ui_with_mode(test_mode)
323325
.await
324326
.map_err(|e| e.into());
325327
}

0 commit comments

Comments
 (0)