synapse-hub 2.2.4 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/agents/failure-analyst.md +11 -0
- package/.agents/agents/live-explorer.md +28 -0
- package/.agents/agents/orchestrator.md +20 -4
- package/.agents/agents/pom-crafter.md +12 -0
- package/.agents/agents/quality-gatekeeper.md +19 -4
- package/.agents/agents/test-runner.md +11 -0
- package/.agents/rules/communication-style.md +40 -0
- package/.agents/rules/context-engineering.md +23 -0
- package/.agents/rules/git-push-protocol.md +10 -16
- package/.agents/rules/graphify.md +14 -14
- package/.agents/rules/mandatory-playwright-live.md +29 -29
- package/.agents/rules/mobile_appium_rules.md +132 -0
- package/.agents/rules/performance_testing_rules.md +74 -0
- package/.agents/rules/systematic-debugging.md +6 -6
- package/.agents/skills/agent-orchestration-multi-agent-optimize/SKILL.md +64 -215
- package/.agents/skills/agent-orchestration-multi-agent-optimize/examples/swarm_workload_config.json +12 -0
- package/.agents/skills/antigravity-test-sentinel/SKILL.md +3 -3
- package/.agents/skills/antigravity-test-sentinel/examples/dod_gate_policy.json +11 -0
- package/.agents/skills/api-network-mocking-interception/SKILL.md +1 -1
- package/.agents/skills/api-network-mocking-interception/examples/network_route_stub.json +9 -0
- package/.agents/skills/api-spec-to-e2e-matrix/SKILL.md +9 -9
- package/.agents/skills/api-spec-to-e2e-matrix/examples/sample_openapi.json +19 -0
- package/.agents/skills/architecture-decision-records/SKILL.md +35 -412
- package/.agents/skills/architecture-decision-records/examples/0001-record-architecture-decisions.md +12 -0
- package/.agents/skills/auth-session-and-cookie-manager/SKILL.md +1 -1
- package/.agents/skills/auth-session-and-cookie-manager/examples/storage_state_sample.json +11 -0
- package/.agents/skills/backend-load-and-stress-patterns/SKILL.md +80 -186
- package/.agents/skills/backend-load-and-stress-patterns/examples/k6_load_test_sample.js +13 -0
- package/.agents/skills/bats-testing-patterns/SKILL.md +1 -1
- package/.agents/skills/bats-testing-patterns/examples/cli_runner_test.bats +6 -0
- package/.agents/skills/bats-testing-patterns/resources/implementation-playbook.md +614 -614
- package/.agents/skills/clean-pom-crafter/SKILL.md +21 -3
- package/.agents/skills/clean-pom-crafter/examples/standard_test_case.groovy +28 -28
- package/.agents/skills/clean-pom-crafter/references/pom_patterns.groovy +138 -138
- package/.agents/skills/code-refactoring-refactor-clean/SKILL.md +2 -2
- package/.agents/skills/code-refactoring-refactor-clean/examples/refactored_page_sample.groovy +9 -0
- package/.agents/skills/db-state-verifier-and-seeder/SKILL.md +5 -5
- package/.agents/skills/db-state-verifier-and-seeder/examples/db_fixture_seed.json +12 -0
- package/.agents/skills/e2e-testing-patterns/SKILL.md +1 -1
- package/.agents/skills/e2e-testing-patterns/examples/playwright_sharded_config.ts +12 -0
- package/.agents/skills/e2e-testing-patterns/resources/implementation-playbook.md +522 -522
- package/.agents/skills/failure-autopsy-and-healing/SKILL.md +17 -3
- package/.agents/skills/failure-autopsy-and-healing/examples/sample_junit_failure.xml +8 -0
- package/.agents/skills/failure-autopsy-and-healing/references/healing_matrix.md +64 -64
- package/.agents/skills/failure-autopsy-and-healing/references/qa_investigation_protocol.md +56 -56
- package/.agents/skills/failure-autopsy-and-healing/scripts/triage_failures.sh +98 -98
- package/.agents/skills/file-and-report-validator/SKILL.md +1 -1
- package/.agents/skills/file-and-report-validator/examples/sample_export_schema.json +14 -0
- package/.agents/skills/flaky-test-sentinel-and-quarantine/SKILL.md +3 -3
- package/.agents/skills/flaky-test-sentinel-and-quarantine/examples/quarantine_registry.json +11 -0
- package/.agents/skills/gherkin-to-suite/SKILL.md +103 -0
- package/.agents/skills/gherkin-to-suite/examples/checkout.feature +39 -0
- package/.agents/skills/gherkin-to-suite/examples/suite_report_sample.json +334 -0
- package/.agents/skills/github-actions-templates/SKILL.md +47 -304
- package/.agents/skills/github-actions-templates/examples/matrix_test_pipeline.yml +8 -0
- package/.agents/skills/graphify-impact-analyzer/SKILL.md +6 -6
- package/.agents/skills/graphify-impact-analyzer/examples/dependency_blast_radius.json +8 -0
- package/.agents/skills/katalon-cli-runner/SKILL.md +2 -2
- package/.agents/skills/katalon-cli-runner/examples/headless_kre_exec.sh +3 -0
- package/.agents/skills/katalon-cli-runner/references/groovy-patterns.md +209 -209
- package/.agents/skills/katalon-cli-runner/references/katalon-api.md +155 -155
- package/.agents/skills/katalon-cli-runner/references/runner_commands.md +67 -67
- package/.agents/skills/lam-script-generator/SKILL.md +42 -1
- package/.agents/skills/lam-script-generator/examples/user_story_sample.md +8 -0
- package/.agents/skills/lean-code-ladder/SKILL.md +83 -0
- package/.agents/skills/lean-code-ladder/examples/ladder_walkthrough.md +37 -0
- package/.agents/skills/meta-prompt-crafter/SKILL.md +107 -0
- package/.agents/skills/meta-prompt-crafter/examples/qa_prompt_template.md +35 -0
- package/.agents/skills/persistent-planning-files/SKILL.md +108 -0
- package/.agents/skills/persistent-planning-files/examples/task_plan_example.md +56 -0
- package/.agents/skills/playwright-live-interaction/SKILL.md +49 -1
- package/.agents/skills/playwright-live-interaction/examples/live_probe_script.js +5 -0
- package/.agents/skills/playwright-live-interaction/references/advanced_superpowers.md +160 -160
- package/.agents/skills/playwright-live-interaction/references/compact_accessibility_snapshots.md +75 -75
- package/.agents/skills/playwright-live-interaction/references/recipes.md +388 -388
- package/.agents/skills/playwright-live-interaction/references/swarm_orchestration.md +134 -134
- package/.agents/skills/playwright-webapp-testing/SKILL.md +93 -0
- package/.agents/skills/playwright-webapp-testing/examples/server_lifecycle_playwright.py +63 -0
- package/.agents/skills/rbt-manual-testing/SKILL.md +150 -0
- package/.agents/skills/rbt-manual-testing/examples/checkout_rbt_manual_suite.md +25 -0
- package/.agents/skills/security-dast-sentinel/SKILL.md +54 -135
- package/.agents/skills/security-dast-sentinel/examples/dast_scan_config.json +10 -0
- package/.agents/skills/self-healing-locator/SKILL.md +24 -10
- package/.agents/skills/self-healing-locator/examples/aom_diff_sample.json +16 -0
- package/.agents/skills/skillspector-security-guard/SKILL.md +32 -90
- package/.agents/skills/skillspector-security-guard/examples/safe_mcp_config.json +12 -0
- package/.agents/skills/surgical-coding-principles/SKILL.md +89 -0
- package/.agents/skills/surgical-coding-principles/examples/surgical_vs_scope_creep.md +46 -0
- package/.agents/skills/synthetic-test-data-generator/SKILL.md +3 -3
- package/.agents/skills/synthetic-test-data-generator/examples/idempotent_data_recipe.json +9 -0
- package/.agents/skills/systematic-debugging/SKILL.md +100 -0
- package/.agents/skills/systematic-debugging/examples/four_phase_case.md +44 -0
- package/.agents/skills/test-driven-development/SKILL.md +114 -0
- package/.agents/skills/test-driven-development/examples/red_green_refactor_qa.md +78 -0
- package/.agents/skills/token-and-context-optimizer/SKILL.md +1 -1
- package/.agents/skills/token-and-context-optimizer/examples/distilled_log_sample.txt +3 -0
- package/.agents/skills/verification-before-completion/SKILL.md +100 -0
- package/.agents/skills/verification-before-completion/examples/evidence_log_example.md +46 -0
- package/.agents/skills/visual-regression-sentinel/SKILL.md +21 -1
- package/.agents/skills/visual-regression-sentinel/examples/visual_mask_rules.json +9 -0
- package/.agents/skills/wcag-audit-patterns/SKILL.md +3 -3
- package/.agents/skills/wcag-audit-patterns/examples/wcag_compliance_checklist.json +10 -0
- package/.agents/skills/wcag-audit-patterns/resources/implementation-playbook.md +541 -541
- package/.agents/skills/web-vitals-and-performance-profiler/SKILL.md +1 -1
- package/.agents/skills/web-vitals-and-performance-profiler/examples/cwv_budget_policy.json +6 -0
- package/.agents/templates/completion_report.md +57 -57
- package/.agents/workflows/analyze_requirement_document.md +18 -0
- package/.agents/workflows/export_testcases_excel.md +32 -0
- package/.agents/workflows/generate_combinatorial_test_data.md +28 -0
- package/.agents/workflows/generate_cross_module_test_plan.md +37 -0
- package/.agents/workflows/generate_manual_testcases_rbt.md +56 -0
- package/.agents/workflows/generate_requirements_from_website.md +25 -0
- package/.agents/workflows/generate_testcases_from_requirements.md +21 -0
- package/.agents/workflows/graphify.md +10 -10
- package/.agents/workflows/verify.md +2 -2
- package/.cursor/rules/language.mdc +7 -7
- package/.cursor/rules/synapse-qa.mdc +23 -0
- package/.cursorrules +7 -0
- package/.pre-commit-hooks.yaml +14 -0
- package/.windsurfrules +7 -0
- package/AGENTS.md +54 -15
- package/CLAUDE.md +35 -12
- package/LICENSE +30 -0
- package/NOTICE +180 -0
- package/README.en.md +325 -0
- package/README.md +247 -516
- package/action.yml +51 -0
- package/benchmarks/qa_eval/README.md +71 -0
- package/benchmarks/qa_eval/build_dataset.py +677 -0
- package/benchmarks/qa_eval/dataset/api_contract_drift/qa-challenge-06_api_contract_drift.json +22 -0
- package/benchmarks/qa_eval/dataset/api_contract_drift/qa-challenge-07_api_contract_drift.json +22 -0
- package/benchmarks/qa_eval/dataset/api_contract_drift/qa-challenge-08_api_contract_drift.json +22 -0
- package/benchmarks/qa_eval/dataset/api_contract_drift/qa-challenge-09_api_contract_drift.json +22 -0
- package/benchmarks/qa_eval/dataset/api_contract_drift/qa-challenge-10_api_contract_drift.json +22 -0
- package/benchmarks/qa_eval/dataset/fake_pass_tautology/qa-challenge-21_fake_pass_tautology.json +21 -0
- package/benchmarks/qa_eval/dataset/fake_pass_tautology/qa-challenge-22_fake_pass_tautology.json +21 -0
- package/benchmarks/qa_eval/dataset/fake_pass_tautology/qa-challenge-23_fake_pass_tautology.json +21 -0
- package/benchmarks/qa_eval/dataset/fake_pass_tautology/qa-challenge-24_fake_pass_tautology.json +21 -0
- package/benchmarks/qa_eval/dataset/fake_pass_tautology/qa-challenge-25_fake_pass_tautology.json +21 -0
- package/benchmarks/qa_eval/dataset/locator_drift/qa-challenge-01_locator_drift.json +23 -0
- package/benchmarks/qa_eval/dataset/locator_drift/qa-challenge-02_locator_drift.json +23 -0
- package/benchmarks/qa_eval/dataset/locator_drift/qa-challenge-03_locator_drift.json +23 -0
- package/benchmarks/qa_eval/dataset/locator_drift/qa-challenge-04_locator_drift.json +23 -0
- package/benchmarks/qa_eval/dataset/locator_drift/qa-challenge-05_locator_drift.json +23 -0
- package/benchmarks/qa_eval/dataset/stale_and_mutation/qa-challenge-16_stale_and_mutation.json +22 -0
- package/benchmarks/qa_eval/dataset/stale_and_mutation/qa-challenge-17_stale_and_mutation.json +22 -0
- package/benchmarks/qa_eval/dataset/stale_and_mutation/qa-challenge-18_stale_and_mutation.json +22 -0
- package/benchmarks/qa_eval/dataset/stale_and_mutation/qa-challenge-19_stale_and_mutation.json +22 -0
- package/benchmarks/qa_eval/dataset/stale_and_mutation/qa-challenge-20_stale_and_mutation.json +23 -0
- package/benchmarks/qa_eval/dataset/timing_and_race/qa-challenge-11_timing_and_race.json +22 -0
- package/benchmarks/qa_eval/dataset/timing_and_race/qa-challenge-12_timing_and_race.json +22 -0
- package/benchmarks/qa_eval/dataset/timing_and_race/qa-challenge-13_timing_and_race.json +22 -0
- package/benchmarks/qa_eval/dataset/timing_and_race/qa-challenge-14_timing_and_race.json +22 -0
- package/benchmarks/qa_eval/dataset/timing_and_race/qa-challenge-15_timing_and_race.json +22 -0
- package/benchmarks/qa_eval/eval_runner.py +418 -0
- package/benchmarks/qa_eval/reports/AB_METHODOLOGY_REPORT.md +83 -0
- package/benchmarks/qa_eval/reports/BENCHMARK_REPORT.md +69 -0
- package/benchmarks/qa_eval/reports/eval_results.json +105 -0
- package/bin/agent-qa.js +10 -3
- package/docs/ARCHITECTURE.md +107 -0
- package/docs/CI_CD_INTEGRATION.md +94 -0
- package/docs/CLI_REFERENCE.md +157 -0
- package/docs/CONTRIBUTING.md +91 -0
- package/docs/PLUGIN_DEVELOPMENT_GUIDE.md +126 -0
- package/docs/TOKEN_QUOTA_PLAYBOOK.md +41 -0
- package/docs/adopted-ecosystem-tools.md +87 -0
- package/docs/schemas/synapse.config.schema.json +64 -0
- package/examples/cypress-ecommerce-suite/README.md +45 -0
- package/examples/cypress-ecommerce-suite/cypress/e2e/checkout.cy.js +17 -0
- package/examples/cypress-ecommerce-suite/cypress/pages/BasePage.js +29 -0
- package/examples/cypress-ecommerce-suite/cypress/pages/CartPage.js +51 -0
- package/examples/cypress-ecommerce-suite/cypress.config.js +13 -0
- package/examples/cypress-ecommerce-suite/package.json +13 -0
- package/examples/katalon-suite/Keywords/pages/BasePage.groovy +19 -0
- package/examples/katalon-suite/Keywords/pages/DashboardPage.groovy +29 -0
- package/examples/katalon-suite/Keywords/pages/LoginPage.groovy +45 -0
- package/examples/katalon-suite/Profiles/default.glbl +12 -0
- package/examples/katalon-suite/README.md +18 -0
- package/examples/katalon-suite/Scripts/Auth/TC_LoginSuccess/Script1234567890.groovy +12 -0
- package/examples/katalon-suite/Scripts/Dashboard/TC_ViewSummary/Script1234567891.groovy +15 -0
- package/examples/katalon-suite/katalon_suite.prj +21 -0
- package/examples/playwright-crm-suite/README.md +40 -0
- package/examples/playwright-crm-suite/package.json +14 -0
- package/examples/playwright-crm-suite/pages/BasePage.ts +37 -0
- package/examples/playwright-crm-suite/pages/CustomerPage.ts +57 -0
- package/examples/playwright-crm-suite/pages/LoginPage.ts +32 -0
- package/examples/playwright-crm-suite/playwright.config.ts +27 -0
- package/examples/playwright-crm-suite/tests/auth.spec.ts +22 -0
- package/examples/playwright-crm-suite/tests/customers.spec.ts +33 -0
- package/examples/plugins/sample-custom-plugin/README.md +14 -0
- package/examples/plugins/sample-custom-plugin/plugin.json +16 -0
- package/examples/plugins/sample-custom-plugin/skills/custom-security-headers-audit/SKILL.md +29 -0
- package/examples/plugins/sample-custom-plugin/skills/custom-security-headers-audit/examples/audit_fixture.json +8 -0
- package/examples/plugins/sample-custom-plugin/tools/custom_security_headers.py +125 -0
- package/examples/practices/README.md +22 -0
- package/examples/practices/requirements/crm/requirements_contracts.md +292 -0
- package/examples/practices/requirements/crm/requirements_customers.md +462 -0
- package/examples/practices/requirements/crm/requirements_login.md +202 -0
- package/examples/practices/requirements/crm/requirements_projects.md +396 -0
- package/examples/practices/requirements/crm/requirements_tasks.md +343 -0
- package/examples/practices/requirements/ecommerce/requirements_category_brand.txt +402 -0
- package/examples/practices/requirements/jira/KAN-5/KAN-1/2026-04-03_04-28-27.png +0 -0
- package/examples/practices/requirements/jira/KAN-5/KAN-1/KAN-1_requirement.md +52 -0
- package/examples/practices/requirements/jira/KAN-5/KAN-4/2026-04-03_04-28-19.png +0 -0
- package/examples/practices/requirements/jira/KAN-5/KAN-4/2026-04-03_04-28-57.png +0 -0
- package/examples/practices/requirements/jira/KAN-5/KAN-4/KAN-4_requirement.md +119 -0
- package/examples/practices/requirements/jira/KAN-5/KAN-5_overview.md +9 -0
- package/examples/practices/requirements/jira/KAN-5/KAN-6/2026-04-03_05-58-08.png +0 -0
- package/examples/practices/requirements/jira/KAN-5/KAN-6/2026-04-03_05-58-23.png +0 -0
- package/examples/practices/requirements/jira/KAN-5/KAN-6/KAN-6_requirement.md +32 -0
- package/examples/practices/testcases/api/book_management_api_test_cases.md +144 -0
- package/examples/practices/testcases/api/user_management_api_test_cases.md +139 -0
- package/examples/practices/testcases/crm/test_cases_crm_login.md +148 -0
- package/examples/practices/testcases/crm/test_cases_customers.md +156 -0
- package/examples/pytest-api-suite/README.md +45 -0
- package/examples/pytest-api-suite/conftest.py +31 -0
- package/examples/pytest-api-suite/pages/user_api_client.py +36 -0
- package/examples/pytest-api-suite/requirements.txt +2 -0
- package/examples/pytest-api-suite/tests/test_user_api.py +44 -0
- package/examples/selenium-suite/README.md +18 -0
- package/examples/selenium-suite/pages/base_page.py +27 -0
- package/examples/selenium-suite/pages/login_page.py +29 -0
- package/examples/selenium-suite/pages/order_page.py +25 -0
- package/examples/selenium-suite/pytest.ini +6 -0
- package/examples/selenium-suite/requirements.txt +2 -0
- package/examples/selenium-suite/tests/test_login.py +10 -0
- package/examples/selenium-suite/tests/test_order.py +10 -0
- package/package.json +22 -7
- package/scripts/generate_skill_examples.py +244 -0
- package/scripts/install.ps1 +112 -0
- package/scripts/install_global_plugin.ps1 +94 -0
- package/scripts/install_global_plugin.sh +49 -0
- package/scripts/lint_skills.ps1 +57 -0
- package/scripts/package_dist.py +323 -0
- package/scripts/setup.sh +59 -0
- package/scripts/update_hub.ps1 +19 -0
- package/scripts/update_hub.sh +15 -0
- package/skills_manifest.json +209 -6
- package/synapse.config.json +30 -0
- package/templates/PROJECT_AI_GUIDE_TEMPLATE.md +7 -7
- package/templates/PROJECT_STATE_TEMPLATE.md +1 -1
- package/templates/ai_bridges/CLAUDE.md +33 -16
- package/templates/ai_bridges/copilot-instructions.md +14 -21
- package/templates/ai_bridges/cursor_synapse_qa.mdc +17 -20
- package/templates/ai_bridges/windsurfrules +21 -21
- package/templates/ci/github-actions-synapse.yml +71 -4
- package/templates/welcome.html.tmpl +1674 -0
- package/tools/.infer_baseline.json +1102 -0
- package/tools/TOOLS_RUNBOOK.md +92 -130
- package/tools/__init__.py +26 -0
- package/tools/agent_canary.py +501 -501
- package/tools/analyze_project.py +31 -17
- package/tools/api_fuzzer.py +278 -6
- package/tools/author_integrity.py +6 -6
- package/tools/auto_heal.py +1 -1
- package/tools/browser_helpers.js +105 -7
- package/tools/bug_reporter.py +31 -1
- package/tools/bump_version.py +23 -3
- package/tools/cache_resolver.py +248 -14
- package/tools/check_env.py +55 -14
- package/tools/check_version_sync.py +153 -0
- package/tools/ci_healing_hook.py +1 -1
- package/tools/cli.py +263 -13
- package/tools/count_tokens.py +1257 -0
- package/tools/dashboard_generator.py +2638 -0
- package/tools/db_sandbox.py +198 -20
- package/tools/e2e_flow_prober.ps1 +12 -64
- package/tools/e2e_flow_prober.py +99 -0
- package/tools/e2e_flow_prober.sh +4 -0
- package/tools/flaky_detector.py +4 -3
- package/tools/generate_allure_report.ps1 +12 -29
- package/tools/generate_allure_report.py +77 -0
- package/tools/generate_allure_report.sh +4 -0
- package/tools/generate_jmx_plan.py +257 -58
- package/tools/generate_test_reports.ps1 +12 -134
- package/tools/generate_test_reports.py +133 -0
- package/tools/generate_test_reports.sh +4 -0
- package/tools/gherkin_suite.py +758 -0
- package/tools/git_pre_commit_guard.py +12 -6
- package/tools/goldfish_review.py +366 -0
- package/tools/heal_pr_automator.py +1 -1
- package/tools/heuristic_locator_matcher.py +170 -21
- package/tools/infer_linter.py +612 -70
- package/tools/lint_ai_docs.py +64 -0
- package/tools/matrix_sharder.py +1 -1
- package/tools/mcp_excel_server.ps1 +12 -250
- package/tools/mcp_excel_server.py +249 -0
- package/tools/mcp_excel_server.sh +4 -0
- package/tools/mcp_server.py +368 -144
- package/tools/md_to_xlsx.py +307 -0
- package/tools/micro_mutator.py +300 -69
- package/tools/omni_transpiler.py +2 -2
- package/tools/output_formatter.py +128 -0
- package/tools/pinpoint_failure.py +88 -88
- package/tools/project_state.py +2 -2
- package/tools/repo_map.py +1 -1
- package/tools/safety_firewall.py +196 -45
- package/tools/setup_project.py +294 -30
- package/tools/spec_drift_sentinel.py +439 -0
- package/tools/sync_agent_rules.py +248 -0
- package/tools/telemetry_correlator.py +45 -0
- package/tools/test_impact.py +51 -12
- package/tools/tms_sync_bridge.py +21 -5
- package/tools/universal_ir.py +3 -0
- package/tools/update_sentinel.py +87 -15
- package/tools/verify_all.ps1 +13 -0
- package/tools/verify_all.py +463 -79
- package/tools/visual_diff_canvas.py +1 -0
- package/tools/visual_som_helper.py +1 -1
- package/tools/watch_mode.py +305 -0
- package/tools/welcome_page.py +291 -0
|
@@ -1,134 +1,134 @@
|
|
|
1
|
-
# Enterprise Multi-Agent Swarm Orchestration Guide (Enterprise Automation)
|
|
2
|
-
|
|
3
|
-
Standard operating procedure, role taxonomy, and collaboration protocol for the **Enterprise Test Engineering Swarm** covering all 259 Test Cases.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## 1. Organizational Hierarchy & Role Taxonomy
|
|
8
|
-
|
|
9
|
-
```mermaid
|
|
10
|
-
flowchart TD
|
|
11
|
-
Boss["👑 PROJECT LEAD (Test Manager / QA Director)<br/>(Strategic direction & final sign-off)"] --> Head["👔 LEAD QA ORCHESTRATOR<br/>(Overall coordination & quality governance)"]
|
|
12
|
-
|
|
13
|
-
subgraph SpecializedSwarm["SPECIALIZED AUTOMATION SWARM"]
|
|
14
|
-
Scout["🔍 LIVE INTERACTION EXPLORER<br/>(DOM/AOM live probing via Playwright MCP)"]
|
|
15
|
-
Crafter["⚒️ AUTOMATION CODE CRAFTER<br/>(Page Classes & Clean POM Groovy scripts)"]
|
|
16
|
-
Runner["⚡ TEST EXECUTION RUNNER<br/>(Headless Katalon CLI execution)"]
|
|
17
|
-
Judge["🛡️ QUALITY GATEKEEPER & ANALYST<br/>(100% UTF-8 No BOM, anti-bypass & RCA)"]
|
|
18
|
-
Scribe["📖 TECHNICAL DOCUMENTATION SPECIALIST<br/>(Business workflows & visual charting)"]
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
Head --> Scout & Crafter & Runner & Judge & Scribe
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## 2. Enterprise Collaboration Protocol
|
|
27
|
-
|
|
28
|
-
1. **User Communication (Project Lead):**
|
|
29
|
-
* Demeanor: Results-oriented, data-driven, concise, transparent.
|
|
30
|
-
* Language with user: Vietnamese (clear engineering terms).
|
|
31
|
-
2. **Internal Agent-to-Agent Protocol:**
|
|
32
|
-
* **Lead QA Orchestrator:** Decomposes Acceptance Criteria, manages timeline, monitors SLAs.
|
|
33
|
-
* **Live Interaction Explorer:** Delivers validated JSON Data Contracts based on live DOM inspection.
|
|
34
|
-
* **Automation Code Crafter:** Implements Page Object Model code under test scrutiny from Runner and gatekeeping from Gatekeeper.
|
|
35
|
-
* **Quality Gatekeeper & Analyst:** Enforces quality standards independently; rejects fake passes; provides RCA evidence.
|
|
36
|
-
* **Technical Documentation Specialist:** Systematizes documentation, translates code into visual Mermaid workflows.
|
|
37
|
-
|
|
38
|
-
---
|
|
39
|
-
|
|
40
|
-
## 3. Specialized Role Responsibilities
|
|
41
|
-
|
|
42
|
-
### 👑 1. Lead QA Orchestrator
|
|
43
|
-
* Receives objectives from Project Lead (e.g. *"Complete Industrial Clusters TC-66 to TC-80"*).
|
|
44
|
-
* Queries `tools/lookup_tc.py` to break down tasks into subagent batches.
|
|
45
|
-
* Invokes specialized subagents and synthesizes completion reports.
|
|
46
|
-
|
|
47
|
-
### 🔍 2. Live Interaction Explorer
|
|
48
|
-
* **Tools:** Playwright MCP (`browser_run_code_unsafe`, `browser_navigate`).
|
|
49
|
-
* **Tasks:**
|
|
50
|
-
- Loads `.agents/session.json` (Zero-Second Auth).
|
|
51
|
-
- Inspects live routes: URL, Title, interactive buttons, inputs, dropdown overlays.
|
|
52
|
-
- Verifies 100% selector hit rate on live browser.
|
|
53
|
-
- Returns compact JSON Data Contract to Code Crafter.
|
|
54
|
-
|
|
55
|
-
### ⚒️ 3. Automation Code Crafter
|
|
56
|
-
* **Tools:** File editing tools.
|
|
57
|
-
* **Tasks:**
|
|
58
|
-
- Consumes Data Contract from Explorer.
|
|
59
|
-
- Implements `public static` methods in `Keywords/pages/<PageClass>.groovy` inheriting `BasePage`.
|
|
60
|
-
- Generates corresponding test scripts (`Scripts/TC-xxx .../Script*.groovy`).
|
|
61
|
-
- Strict compliance with Flat Architecture and Clean POM (zero raw XPaths in test scripts).
|
|
62
|
-
|
|
63
|
-
### ⚡ 4. Test Execution Runner
|
|
64
|
-
* **Tools:** Run command tools (`katalonc`, shell/PowerShell runners).
|
|
65
|
-
* **Tasks:**
|
|
66
|
-
- Executes targeted suites or batches in pure Headless Mode.
|
|
67
|
-
- Captures `Screenshots/FAILED_*.png` on failure; compiles Allure reports.
|
|
68
|
-
- Hands over results to Quality Gatekeeper.
|
|
69
|
-
|
|
70
|
-
### 🛡️ 5. Quality Gatekeeper & Failure Analyst
|
|
71
|
-
* **Tools:** Static checkers, test assertion validators.
|
|
72
|
-
* **Tasks:**
|
|
73
|
-
- Enforces 100% UTF-8 No BOM (`0xEF, 0xBB, 0xBF`).
|
|
74
|
-
- Rejects fake passes (verifies real toast notifications and table data).
|
|
75
|
-
- Conducts visual RCA via `triage_failures.sh` and `Screenshots/FAILED_*.png`.
|
|
76
|
-
|
|
77
|
-
### 📖 6. Technical Documentation Specialist
|
|
78
|
-
* **Tasks:**
|
|
79
|
-
- Translates `.groovy` scripts into plain business requirements.
|
|
80
|
-
- Generates Mermaid sequence and flowchart diagrams.
|
|
81
|
-
- Documents technical rationale (why specific coordinates or synthetic events are required).
|
|
82
|
-
|
|
83
|
-
---
|
|
84
|
-
|
|
85
|
-
## 4. Launching Swarm in Antigravity
|
|
86
|
-
|
|
87
|
-
- **Method 1 (UI Slash Command):** Type `/teamwork-preview` to visualize parallel subagents.
|
|
88
|
-
- **Method 2 (Autonomous Prompt):** Prompt: *"Act as Lead QA Orchestrator, dispatch Swarm to complete TC-123 through TC-127."*
|
|
89
|
-
* Orchestrator invokes `Live Explorer` for DOM probing.
|
|
90
|
-
* Next invokes `Code Crafter` to write Groovy code.
|
|
91
|
-
* Finally invokes `Quality Gatekeeper` for verification.
|
|
92
|
-
|
|
93
|
-
---
|
|
94
|
-
|
|
95
|
-
## 5. Multi-Agent Adversarial Debate
|
|
96
|
-
|
|
97
|
-
```mermaid
|
|
98
|
-
sequenceDiagram
|
|
99
|
-
participant Crafter as ⚒️ Automation Code Crafter
|
|
100
|
-
participant Explorer as 🔍 Live Interaction Explorer
|
|
101
|
-
participant Gatekeeper as 🛡️ Quality Gatekeeper
|
|
102
|
-
participant Judge as 👑 Lead QA Orchestrator
|
|
103
|
-
|
|
104
|
-
Crafter->>Explorer: "Created Supermarket method drawing Polygon at (-180, -80)."
|
|
105
|
-
Explorer-->>Crafter: "CHALLENGE: Live DOM shows Supermarket is POINT, not POLYGON! Will fail like TC-135."
|
|
106
|
-
Crafter->>Crafter: Refactors to clickPointOnCanvas().
|
|
107
|
-
Crafter->>Gatekeeper: "Submitted updated Point implementation."
|
|
108
|
-
Gatekeeper-->>Crafter: "CHALLENGE: Only delay(3) without verifying real success Toast. Fake pass detected!"
|
|
109
|
-
Crafter->>Crafter: Adds verifyMiningSuccess('thành công').
|
|
110
|
-
Crafter->>Gatekeeper: "Added real Toast assertion + verified UTF-8 No BOM."
|
|
111
|
-
Gatekeeper->>Judge: "REPORT: Code 100% compliant."
|
|
112
|
-
Judge->>Judge: Consensus reached -> Commit code!
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
---
|
|
116
|
-
|
|
117
|
-
## 6. Model Routing Strategy (Quota Optimization)
|
|
118
|
-
|
|
119
|
-
| Subagent Role | Recommended Model | Rationale & Tasks |
|
|
120
|
-
|---|:---:|---|
|
|
121
|
-
| **Quality Gatekeeper & Failure Analyst** | `flash` / `flash_lite` | Parses long KRE console logs, checks JUnit XML & BOM, ultra-fast (<0.5s), saves 70% quota. |
|
|
122
|
-
| **Test Execution Runner** | `flash` | Executes CLI runners, checks exit codes. |
|
|
123
|
-
| **Live Interaction Explorer** | `pro` / `inherit` | Complex DOM inspection, OpenLayers GIS navigation, AOM snapshots. |
|
|
124
|
-
| **Automation Code Crafter** | `pro` / `inherit` | Clean POM Groovy refactoring, Angular synthetic event handling. |
|
|
125
|
-
| **Lead QA Orchestrator** | `pro` / `inherit` | Acceptance Criteria decomposition and architectural decision-making. |
|
|
126
|
-
|
|
127
|
-
---
|
|
128
|
-
|
|
129
|
-
## 7. Auto Cleanup Blacklist
|
|
130
|
-
|
|
131
|
-
All Subagents **MUST** clean up temporary files before returning control to Orchestrator:
|
|
132
|
-
- Dumps: `*_debug.txt`, `debug_output.txt`, `dom_dump.txt`, `html_dump.html`, `network_requests.txt`, `console_log.txt`
|
|
133
|
-
- Snapshots: `page_snapshot.md`, `snapshot_*.md`, `.agents/screenshots/gis_canvas_live.png`
|
|
134
|
-
- Scratch files: `scratch_*.*`, `*.tmp`, `*.temp`
|
|
1
|
+
# Enterprise Multi-Agent Swarm Orchestration Guide (Enterprise Automation)
|
|
2
|
+
|
|
3
|
+
Standard operating procedure, role taxonomy, and collaboration protocol for the **Enterprise Test Engineering Swarm** covering all 259 Test Cases.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Organizational Hierarchy & Role Taxonomy
|
|
8
|
+
|
|
9
|
+
```mermaid
|
|
10
|
+
flowchart TD
|
|
11
|
+
Boss["👑 PROJECT LEAD (Test Manager / QA Director)<br/>(Strategic direction & final sign-off)"] --> Head["👔 LEAD QA ORCHESTRATOR<br/>(Overall coordination & quality governance)"]
|
|
12
|
+
|
|
13
|
+
subgraph SpecializedSwarm["SPECIALIZED AUTOMATION SWARM"]
|
|
14
|
+
Scout["🔍 LIVE INTERACTION EXPLORER<br/>(DOM/AOM live probing via Playwright MCP)"]
|
|
15
|
+
Crafter["⚒️ AUTOMATION CODE CRAFTER<br/>(Page Classes & Clean POM Groovy scripts)"]
|
|
16
|
+
Runner["⚡ TEST EXECUTION RUNNER<br/>(Headless Katalon CLI execution)"]
|
|
17
|
+
Judge["🛡️ QUALITY GATEKEEPER & ANALYST<br/>(100% UTF-8 No BOM, anti-bypass & RCA)"]
|
|
18
|
+
Scribe["📖 TECHNICAL DOCUMENTATION SPECIALIST<br/>(Business workflows & visual charting)"]
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
Head --> Scout & Crafter & Runner & Judge & Scribe
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## 2. Enterprise Collaboration Protocol
|
|
27
|
+
|
|
28
|
+
1. **User Communication (Project Lead):**
|
|
29
|
+
* Demeanor: Results-oriented, data-driven, concise, transparent.
|
|
30
|
+
* Language with user: Vietnamese (clear engineering terms).
|
|
31
|
+
2. **Internal Agent-to-Agent Protocol:**
|
|
32
|
+
* **Lead QA Orchestrator:** Decomposes Acceptance Criteria, manages timeline, monitors SLAs.
|
|
33
|
+
* **Live Interaction Explorer:** Delivers validated JSON Data Contracts based on live DOM inspection.
|
|
34
|
+
* **Automation Code Crafter:** Implements Page Object Model code under test scrutiny from Runner and gatekeeping from Gatekeeper.
|
|
35
|
+
* **Quality Gatekeeper & Analyst:** Enforces quality standards independently; rejects fake passes; provides RCA evidence.
|
|
36
|
+
* **Technical Documentation Specialist:** Systematizes documentation, translates code into visual Mermaid workflows.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## 3. Specialized Role Responsibilities
|
|
41
|
+
|
|
42
|
+
### 👑 1. Lead QA Orchestrator
|
|
43
|
+
* Receives objectives from Project Lead (e.g. *"Complete Industrial Clusters TC-66 to TC-80"*).
|
|
44
|
+
* Queries `tools/lookup_tc.py` to break down tasks into subagent batches.
|
|
45
|
+
* Invokes specialized subagents and synthesizes completion reports.
|
|
46
|
+
|
|
47
|
+
### 🔍 2. Live Interaction Explorer
|
|
48
|
+
* **Tools:** Playwright MCP (`browser_run_code_unsafe`, `browser_navigate`).
|
|
49
|
+
* **Tasks:**
|
|
50
|
+
- Loads `.agents/session.json` (Zero-Second Auth).
|
|
51
|
+
- Inspects live routes: URL, Title, interactive buttons, inputs, dropdown overlays.
|
|
52
|
+
- Verifies 100% selector hit rate on live browser.
|
|
53
|
+
- Returns compact JSON Data Contract to Code Crafter.
|
|
54
|
+
|
|
55
|
+
### ⚒️ 3. Automation Code Crafter
|
|
56
|
+
* **Tools:** File editing tools.
|
|
57
|
+
* **Tasks:**
|
|
58
|
+
- Consumes Data Contract from Explorer.
|
|
59
|
+
- Implements `public static` methods in `Keywords/pages/<PageClass>.groovy` inheriting `BasePage`.
|
|
60
|
+
- Generates corresponding test scripts (`Scripts/TC-xxx .../Script*.groovy`).
|
|
61
|
+
- Strict compliance with Flat Architecture and Clean POM (zero raw XPaths in test scripts).
|
|
62
|
+
|
|
63
|
+
### ⚡ 4. Test Execution Runner
|
|
64
|
+
* **Tools:** Run command tools (`katalonc`, shell/PowerShell runners).
|
|
65
|
+
* **Tasks:**
|
|
66
|
+
- Executes targeted suites or batches in pure Headless Mode.
|
|
67
|
+
- Captures `Screenshots/FAILED_*.png` on failure; compiles Allure reports.
|
|
68
|
+
- Hands over results to Quality Gatekeeper.
|
|
69
|
+
|
|
70
|
+
### 🛡️ 5. Quality Gatekeeper & Failure Analyst
|
|
71
|
+
* **Tools:** Static checkers, test assertion validators.
|
|
72
|
+
* **Tasks:**
|
|
73
|
+
- Enforces 100% UTF-8 No BOM (`0xEF, 0xBB, 0xBF`).
|
|
74
|
+
- Rejects fake passes (verifies real toast notifications and table data).
|
|
75
|
+
- Conducts visual RCA via `triage_failures.sh` and `Screenshots/FAILED_*.png`.
|
|
76
|
+
|
|
77
|
+
### 📖 6. Technical Documentation Specialist
|
|
78
|
+
* **Tasks:**
|
|
79
|
+
- Translates `.groovy` scripts into plain business requirements.
|
|
80
|
+
- Generates Mermaid sequence and flowchart diagrams.
|
|
81
|
+
- Documents technical rationale (why specific coordinates or synthetic events are required).
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## 4. Launching Swarm in Antigravity
|
|
86
|
+
|
|
87
|
+
- **Method 1 (UI Slash Command):** Type `/teamwork-preview` to visualize parallel subagents.
|
|
88
|
+
- **Method 2 (Autonomous Prompt):** Prompt: *"Act as Lead QA Orchestrator, dispatch Swarm to complete TC-123 through TC-127."*
|
|
89
|
+
* Orchestrator invokes `Live Explorer` for DOM probing.
|
|
90
|
+
* Next invokes `Code Crafter` to write Groovy code.
|
|
91
|
+
* Finally invokes `Quality Gatekeeper` for verification.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## 5. Multi-Agent Adversarial Debate
|
|
96
|
+
|
|
97
|
+
```mermaid
|
|
98
|
+
sequenceDiagram
|
|
99
|
+
participant Crafter as ⚒️ Automation Code Crafter
|
|
100
|
+
participant Explorer as 🔍 Live Interaction Explorer
|
|
101
|
+
participant Gatekeeper as 🛡️ Quality Gatekeeper
|
|
102
|
+
participant Judge as 👑 Lead QA Orchestrator
|
|
103
|
+
|
|
104
|
+
Crafter->>Explorer: "Created Supermarket method drawing Polygon at (-180, -80)."
|
|
105
|
+
Explorer-->>Crafter: "CHALLENGE: Live DOM shows Supermarket is POINT, not POLYGON! Will fail like TC-135."
|
|
106
|
+
Crafter->>Crafter: Refactors to clickPointOnCanvas().
|
|
107
|
+
Crafter->>Gatekeeper: "Submitted updated Point implementation."
|
|
108
|
+
Gatekeeper-->>Crafter: "CHALLENGE: Only delay(3) without verifying real success Toast. Fake pass detected!"
|
|
109
|
+
Crafter->>Crafter: Adds verifyMiningSuccess('thành công').
|
|
110
|
+
Crafter->>Gatekeeper: "Added real Toast assertion + verified UTF-8 No BOM."
|
|
111
|
+
Gatekeeper->>Judge: "REPORT: Code 100% compliant."
|
|
112
|
+
Judge->>Judge: Consensus reached -> Commit code!
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## 6. Model Routing Strategy (Quota Optimization)
|
|
118
|
+
|
|
119
|
+
| Subagent Role | Recommended Model | Rationale & Tasks |
|
|
120
|
+
|---|:---:|---|
|
|
121
|
+
| **Quality Gatekeeper & Failure Analyst** | `flash` / `flash_lite` | Parses long KRE console logs, checks JUnit XML & BOM, ultra-fast (<0.5s), saves 70% quota. |
|
|
122
|
+
| **Test Execution Runner** | `flash` | Executes CLI runners, checks exit codes. |
|
|
123
|
+
| **Live Interaction Explorer** | `pro` / `inherit` | Complex DOM inspection, OpenLayers GIS navigation, AOM snapshots. |
|
|
124
|
+
| **Automation Code Crafter** | `pro` / `inherit` | Clean POM Groovy refactoring, Angular synthetic event handling. |
|
|
125
|
+
| **Lead QA Orchestrator** | `pro` / `inherit` | Acceptance Criteria decomposition and architectural decision-making. |
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## 7. Auto Cleanup Blacklist
|
|
130
|
+
|
|
131
|
+
All Subagents **MUST** clean up temporary files before returning control to Orchestrator:
|
|
132
|
+
- Dumps: `*_debug.txt`, `debug_output.txt`, `dom_dump.txt`, `html_dump.html`, `network_requests.txt`, `console_log.txt`
|
|
133
|
+
- Snapshots: `page_snapshot.md`, `snapshot_*.md`, `.agents/screenshots/gis_canvas_live.png`
|
|
134
|
+
- Scratch files: `scratch_*.*`, `*.tmp`, `*.temp`
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: playwright-webapp-testing
|
|
3
|
+
description: "Drive Playwright test runs against a local web application with a managed server lifecycle: start, wait for readiness, run automation, and guarantee teardown. Use when verifying frontend functionality or debugging UI behavior of a dynamic webapp that must be started before testing."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Playwright Webapp Testing — Enterprise Server-Lifecycle Standard
|
|
7
|
+
|
|
8
|
+
Specialized skill for testing local dynamic web applications with Playwright under Synapse Hub rules: managed server lifecycle, smart waits instead of static sleeps, and the 3-Stage Live Protocol for selector discovery.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 1. Server Lifecycle Contract
|
|
13
|
+
|
|
14
|
+
```mermaid
|
|
15
|
+
flowchart LR
|
|
16
|
+
A["1. Spawn server<br/>(command + port)"] --> B["2. Poll readiness<br/>(port/health endpoint)"]
|
|
17
|
+
B --> C["3. Run automation<br/>(Playwright headless)"]
|
|
18
|
+
C --> D["4. Teardown<br/>(always, even on failure)"]
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
- **Rule:** the automation script contains ONLY Playwright logic. Server spawn, readiness polling, and teardown are handled by the lifecycle wrapper so the browser never races the server.
|
|
22
|
+
- Single server: launch the app command, poll its port until ready, then run the suite.
|
|
23
|
+
- Multiple servers (backend + frontend): every server gets its own readiness poll; the suite starts only after ALL are ready.
|
|
24
|
+
- Teardown is unconditional — a failed test run must still shut down spawned processes (driver/process cleanup mirrors `katalon-cli-runner` discipline).
|
|
25
|
+
|
|
26
|
+
## 2. Standard Configuration (Hub Baseline)
|
|
27
|
+
|
|
28
|
+
- **Headless mode, 1920x1080 Full HD viewport** — mandatory per `AGENTS.md` Section 2.
|
|
29
|
+
- Chromium first; multi-browser coverage is governed by `e2e-testing-patterns`.
|
|
30
|
+
- Launch pattern:
|
|
31
|
+
|
|
32
|
+
```python
|
|
33
|
+
from playwright.sync_api import sync_playwright
|
|
34
|
+
|
|
35
|
+
with sync_playwright() as p:
|
|
36
|
+
browser = p.chromium.launch(headless=True) # always headless
|
|
37
|
+
page = browser.new_page(viewport={"width": 1920, "height": 1080})
|
|
38
|
+
page.goto("http://localhost:5173")
|
|
39
|
+
page.wait_for_load_state("networkidle") # CRITICAL: wait for JS to execute
|
|
40
|
+
# automation logic using discovered selectors
|
|
41
|
+
browser.close()
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## 3. Decision Tree: Static vs Dynamic
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
Task -> Is the page static HTML?
|
|
48
|
+
|- Yes -> Read the HTML directly to identify selectors, then script.
|
|
49
|
+
|- No (dynamic webapp) -> Is the server already running?
|
|
50
|
+
|- No -> Apply the full lifecycle contract (section 1), then script.
|
|
51
|
+
|- Yes -> Reconnaissance-then-action (section 4) on the live app.
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## 4. Reconnaissance-Then-Action Pattern
|
|
55
|
+
|
|
56
|
+
For a dynamic app, never guess selectors:
|
|
57
|
+
|
|
58
|
+
1. Navigate and wait for `networkidle`.
|
|
59
|
+
2. Inspect the rendered state: screenshot or DOM snapshot (`browser_helpers.js` in-browser validation engine for form audits and safe clicks).
|
|
60
|
+
3. Identify selectors from the rendered state using the 6-Tier locator priority from `clean-pom-crafter` (ARIA/test-id first).
|
|
61
|
+
4. Execute actions with discovered, verified selectors.
|
|
62
|
+
|
|
63
|
+
**Common pitfall:** inspecting the DOM before `networkidle` on dynamic apps. The wait comes first, inspection second — always.
|
|
64
|
+
|
|
65
|
+
## 5. Smart Wait Rules (Zero Static Sleeps)
|
|
66
|
+
|
|
67
|
+
- FORBIDDEN: `time.sleep()`, `Thread.sleep()`, fixed `wait_for_timeout` as a synchronization strategy (per `AGENTS.md` Section 1).
|
|
68
|
+
- Required: `wait_for_load_state("networkidle")`, `wait_for_selector`, `expect` web-first assertions with auto-retry, or explicit condition polling.
|
|
69
|
+
- `wait_for_timeout` is tolerated only inside after-step settle windows where no condition is observable, and must carry a comment explaining why.
|
|
70
|
+
|
|
71
|
+
## 6. Evidence & Debugging Rules
|
|
72
|
+
|
|
73
|
+
- Capture console logs and failed-request events during runs; attach the distilled failure block to reports, not full logs (distill via `tools/distill_log.py`).
|
|
74
|
+
- On failure: apply `systematic-debugging` — reproduce, isolate, root-cause — before touching selectors; broken locators heal via `self-healing-locator` with a live re-probe through Stage 1 of the Live Protocol.
|
|
75
|
+
- Claims of "suite passes" follow `verification-before-completion`: quote the fresh run output.
|
|
76
|
+
|
|
77
|
+
## 7. Boundary vs Sibling Skills (Do Not Confuse)
|
|
78
|
+
|
|
79
|
+
| Sibling | Owns | Hand-off |
|
|
80
|
+
|---|---|---|
|
|
81
|
+
| `playwright-live-interaction` | Stage 1 DOM/AOM probing and 200ms selector verification | This skill consumes verified selector contracts for full app test runs |
|
|
82
|
+
| `e2e-testing-patterns` | Multi-browser architecture, sharding, retry governance | This skill owns the single-run server lifecycle; suite topology stays with e2e patterns |
|
|
83
|
+
| `auth-session-and-cookie-manager` | Login states, storageState, multi-role sessions | Complex auth flows inject their storageState before this skill's run starts |
|
|
84
|
+
|
|
85
|
+
## 8. Reference Documentation
|
|
86
|
+
|
|
87
|
+
- [Server lifecycle example (`server_lifecycle_playwright.py`)](examples/server_lifecycle_playwright.py): readiness-polling wrapper + minimal automation script.
|
|
88
|
+
- `tools/browser_helpers.js` — in-browser validation engine (safe clicks, form audits, batch verification).
|
|
89
|
+
- `tools/distill_log.py` — distill verbose run logs by ~95% before attaching to reports.
|
|
90
|
+
|
|
91
|
+
## 9. Attribution
|
|
92
|
+
|
|
93
|
+
Adapted from **webapp-testing** in anthropics/skills (https://github.com/anthropics/skills) — Apache License 2.0, Copyright 2026 Anthropic, PBC. The server-lifecycle contract, decision tree, and reconnaissance-then-action pattern are re-scoped to Synapse Hub standards (headless 1920x1080, smart waits, hub tool wiring); this is a rewritten derivative, not a verbatim copy.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"""Example: managed server lifecycle + minimal Playwright automation.
|
|
2
|
+
|
|
3
|
+
Hub baseline: headless chromium, 1920x1080 viewport, networkidle wait,
|
|
4
|
+
unconditional teardown. The automation script contains only Playwright
|
|
5
|
+
logic; the lifecycle wrapper owns spawn/ready/teardown.
|
|
6
|
+
"""
|
|
7
|
+
import socket
|
|
8
|
+
import subprocess
|
|
9
|
+
import time
|
|
10
|
+
from contextlib import contextmanager
|
|
11
|
+
|
|
12
|
+
from playwright.sync_api import sync_playwright
|
|
13
|
+
|
|
14
|
+
APP_DIR = "apps/web" # relative to the target project root
|
|
15
|
+
START_CMD = ["npm", "run", "dev"] # argv list: never spawn with shell=True
|
|
16
|
+
PORT = 5173
|
|
17
|
+
READY_TIMEOUT_S = 30
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def _port_ready(port: int) -> bool:
|
|
21
|
+
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
|
|
22
|
+
sock.settimeout(1)
|
|
23
|
+
return sock.connect_ex(("127.0.0.1", port)) == 0
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@contextmanager
|
|
27
|
+
def managed_server(start_cmd: list, port: int):
|
|
28
|
+
"""Spawn the app server, poll readiness, guarantee teardown."""
|
|
29
|
+
proc = subprocess.Popen(start_cmd, shell=False, cwd=APP_DIR)
|
|
30
|
+
try:
|
|
31
|
+
deadline = time.monotonic() + READY_TIMEOUT_S
|
|
32
|
+
while not _port_ready(port):
|
|
33
|
+
if time.monotonic() > deadline:
|
|
34
|
+
raise RuntimeError(f"server not ready on port {port} within {READY_TIMEOUT_S}s")
|
|
35
|
+
time.sleep(0.5) # poll interval, not a synchronization sleep
|
|
36
|
+
yield
|
|
37
|
+
finally:
|
|
38
|
+
proc.terminate()
|
|
39
|
+
try:
|
|
40
|
+
proc.wait(timeout=10)
|
|
41
|
+
except subprocess.TimeoutExpired:
|
|
42
|
+
proc.kill()
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def run_automation() -> None:
|
|
46
|
+
with sync_playwright() as p:
|
|
47
|
+
browser = p.chromium.launch(headless=True) # always headless
|
|
48
|
+
page = browser.new_page(viewport={"width": 1920, "height": 1080})
|
|
49
|
+
try:
|
|
50
|
+
page.goto("http://localhost:5173")
|
|
51
|
+
page.wait_for_load_state("networkidle") # CRITICAL before inspection
|
|
52
|
+
# Reconnaissance-then-action: verify selectors via the live DOM
|
|
53
|
+
# contract from playwright-live-interaction before acting on them.
|
|
54
|
+
page.get_by_role("button", name="Create invoice").click()
|
|
55
|
+
page.get_by_role("dialog").wait_for(state="visible")
|
|
56
|
+
assert "Invoice" in page.get_by_role("heading").inner_text()
|
|
57
|
+
finally:
|
|
58
|
+
browser.close() # unconditional teardown
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
if __name__ == "__main__":
|
|
62
|
+
with managed_server(START_CMD, PORT):
|
|
63
|
+
run_automation()
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rbt-manual-testing
|
|
3
|
+
description: "Comprehensive Risk-Based Testing (AI-RBT) 6-stage manual test case generation, Ambiguity Q&A analysis, Traceability Matrix, Field-Level Validation Checklist (15 input field types), Non-Functional scenarios (Double-Submit, Race Conditions), and Excel export formatting. Use when generating risk-based manual test cases and exploratory charters."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# RBT Manual Testing (AI-Driven Risk-Based Testing Engine)
|
|
7
|
+
|
|
8
|
+
## 1. Overview & Capabilities
|
|
9
|
+
|
|
10
|
+
**RBT Manual Testing** is an enterprise-grade skill for designing manual test suites using **Risk-Based Testing (RBT)** and coverage matrix analysis. It provides two operational modes:
|
|
11
|
+
|
|
12
|
+
| Mode | When to Use | Scope & Characteristics | Execution Time |
|
|
13
|
+
| :--- | :--- | :--- | :--- |
|
|
14
|
+
| **QUICK Mode** | Standalone modules, simple forms, unambiguous specs | Single-pass generation with EP/BVA coverage | Fast (~1-2 min) |
|
|
15
|
+
| **FULL RBT Mode** | Enterprise workflows, complex business rules, high risk | 6-stage sequential pipeline with checkpoints for Ambiguity & RTM | Thorough & structured |
|
|
16
|
+
|
|
17
|
+
### Core Tenets:
|
|
18
|
+
1. **Human Strategy:** Engineers define business boundaries, risk appetite, and resolve flagged ambiguities.
|
|
19
|
+
2. **AI Execution:** Agent decomposes modules, builds coverage matrices, applies the 15-field validation checklist, and computes risk scores.
|
|
20
|
+
3. **Enterprise Deliverables:** Standardized 12-column Markdown tables with automation metadata, ready for export to Excel (`.xlsx`), Jira Xray, or TestRail.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 2. Mode Routing
|
|
25
|
+
|
|
26
|
+
- **Trigger QUICK Mode:**
|
|
27
|
+
- "quick test cases", "generate test cases for registration form", "generate test cases from requirement".
|
|
28
|
+
- Small scope (single screen, isolated dialog), clear requirements.
|
|
29
|
+
- **Trigger FULL RBT Mode:**
|
|
30
|
+
- "/generate_manual_testcases_rbt", "6-step RBT process", "risk-based test plan", "comprehensive manual suite".
|
|
31
|
+
- Complex multi-step flows, cross-module dependencies, or audit requirements.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## 3. Mode 1: QUICK Mode (Fast Single-Pass)
|
|
36
|
+
|
|
37
|
+
1. **Requirement Analysis:** Map Happy Paths, Negative Paths, Boundary Conditions, and Edge Cases.
|
|
38
|
+
2. **Test Design Techniques:**
|
|
39
|
+
- **Equivalence Partitioning (EP):** Partition valid and invalid input classes.
|
|
40
|
+
- **Boundary Value Analysis (BVA):** Evaluate `Min-1`, `Min`, `Min+1`, `Max-1`, `Max`, `Max+1`.
|
|
41
|
+
- **Decision Table:** Combinatorial matrix for multi-conditional business rules.
|
|
42
|
+
- **State Transition:** Sequence of object lifecycle states (`Draft` -> `Pending` -> `Approved`).
|
|
43
|
+
3. **Field-Level Validation:** Generate dedicated validation cases for each form input using the 15-field checklist.
|
|
44
|
+
4. **Standard Markdown Export:** Format output into the standard 12-column table with automation tags.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## 4. Mode 2: FULL RBT (6-Stage Sequential Pipeline)
|
|
49
|
+
|
|
50
|
+
```mermaid
|
|
51
|
+
flowchart TD
|
|
52
|
+
S1["<b>Stage 1: Context & Framing</b><br/>Role-play, scope & MVP boundaries"] --> S2["<b>Stage 2: Analysis & QnA</b><br/>Ambiguity detection (Checkpoint)"]
|
|
53
|
+
S2 --> S3["<b>Stage 3: Decomposition</b><br/>Module hierarchy & dependencies"]
|
|
54
|
+
S3 --> S4["<b>Stage 4: Traceability & Gap</b><br/>RTM & High-Level Scenarios (Checkpoint)"]
|
|
55
|
+
S4 --> S5["<b>Stage 5: Test Case Authoring</b><br/>Risk Scoring (H/M/L) + 15 Field Types"]
|
|
56
|
+
S5 --> S6["<b>Stage 6: Template Mapping</b><br/>12-column table + Automation tags"]
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Stage 1: Context & Framing
|
|
60
|
+
- Identify target system goals, user personas, testing standards, and release scope (MVP vs Full).
|
|
61
|
+
- Confirm understanding with the user before proceeding.
|
|
62
|
+
|
|
63
|
+
### Stage 2: Analysis & Ambiguity Q&A
|
|
64
|
+
- Map business paths: Happy Path, Alternate Paths, Exception Paths.
|
|
65
|
+
- Detect ambiguities: missing rules, contradictions, undefined error messages, missing timeouts.
|
|
66
|
+
- Format numbered Q&A table (`Q1, Q2, Q3...`) with context and proposed assumptions.
|
|
67
|
+
- 🛑 **Checkpoint:** Pause and wait for user/stakeholder response before Stage 3.
|
|
68
|
+
|
|
69
|
+
### Stage 3: System Decomposition
|
|
70
|
+
- Decompose system into Modules -> Sub-modules -> Components.
|
|
71
|
+
- Map functional dependencies and shared state across modules.
|
|
72
|
+
|
|
73
|
+
### Stage 4: Traceability Matrix (RTM) & Gap Analysis
|
|
74
|
+
- Build Requirements Traceability Matrix linking requirement IDs (`REQ-xxx`) to high-level test scenarios.
|
|
75
|
+
- Perform gap analysis to detect uncovered edge cases or orphan flows.
|
|
76
|
+
- 🛑 **Checkpoint:** Present scenario outline for user sign-off.
|
|
77
|
+
|
|
78
|
+
### Stage 5: Detailed Test Case Generation & Risk Scoring
|
|
79
|
+
- Assign Risk Level:
|
|
80
|
+
- **High:** Core revenue flows, payment processing, authentication, data loss risks.
|
|
81
|
+
- **Medium:** CRUD operations, table filtering, search, pagination.
|
|
82
|
+
- **Low:** Cosmetic UI, tooltips, static informational content.
|
|
83
|
+
- Non-Functional & Resilience Scenarios:
|
|
84
|
+
- **Double Submit / Race Conditions:** Rapid consecutive clicks on submit, concurrent edits.
|
|
85
|
+
- **Network Interruption:** Connection drops mid-transaction.
|
|
86
|
+
- **Browser Navigation:** Browser Back/Forward or page refresh during multi-step wizards.
|
|
87
|
+
- Field-Level Validation: Generate dedicated test cases for each input field.
|
|
88
|
+
|
|
89
|
+
### Stage 6: Template Mapping & Automation Metadata
|
|
90
|
+
- Assemble all test cases into the standard 12-column Markdown table.
|
|
91
|
+
- Populate automation metadata: `Automatable` (`Yes`/`No`/`Partial`), `Auto Type` (`UI`/`API`/`Unit`/`N/A`), `@Tags` (`@Smoke`, `@Regression`, `@CriticalPath`).
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## 5. Field-Level Validation Checklist (15 Field Types)
|
|
96
|
+
|
|
97
|
+
| Field Type | Positive Verification | Boundary & Negative Checks (BVA) | Security & Edge Cases |
|
|
98
|
+
| :--- | :--- | :--- | :--- |
|
|
99
|
+
| **1. Text (Name, Title)** | Valid length, Unicode support | Empty, leading/trailing whitespace, `Max`, `Max+1` | XSS `<script>`, SQLi `' OR 1=1--`, HTML tags, surrogate emojis |
|
|
100
|
+
| **2. Email** | Standard format (`user@domain.com`) | Missing `@`, missing TLD, multiple `@`, spaces | Max 254 characters, Internationalized Domain Names (IDN) |
|
|
101
|
+
| **3. Phone** | Standard E.164 or national format | Letters, symbols, too short/long, negative numbers | Leading `+`, spaces, dashes, country code mismatches |
|
|
102
|
+
| **4. Password** | Complexity requirements met (Upper, lower, digit, symbol) | Missing criteria, `Min-1`, excessive length | Spaces in password, clipboard paste blocking/support |
|
|
103
|
+
| **5. Number (Quantity, Price)** | Integer/float within valid range | Alpha chars, negative values, 0 (if disallowed), decimals | Integer overflow (> 2^31-1), thousands separator formats |
|
|
104
|
+
| **6. Date / Datetime** | Valid date format (`YYYY-MM-DD` / `DD/MM/YYYY`) | Invalid calendar dates (Feb 30), leap year checks | Past vs future boundary restrictions, manual input vs picker |
|
|
105
|
+
| **7. Date Range** | `StartDate <= EndDate` | `StartDate > EndDate`, single date selected | Same-day range, date span exceeding system max limit |
|
|
106
|
+
| **8. Dropdown / Select** | Select valid option, search filter | Unselected mandatory field, empty options list | Async loading delays, large option lists (> 1,000 items) |
|
|
107
|
+
| **9. Multi-Select** | Select multiple items, deselect individual | Exceeding max selection limit, Select All | Search filter within list, badge dismissal ("x" click) |
|
|
108
|
+
| **10. Checkbox / Radio** | Toggle check/uncheck, switch radio option | Unchecked mandatory consent (Terms of Service) | Rapid toggle spam, disabled read-only state |
|
|
109
|
+
| **11. Textarea (Notes, Bio)** | Multi-line text with line breaks | Exceeding character limit, whitespace-only input | Control characters (CRLF, tabs), rich-text paste injection |
|
|
110
|
+
| **12. File Upload** | Allowed file format & size limits | Disallowed extension (`.exe`), 0-byte file, oversized file | Special characters in filename, mime-type spoofing |
|
|
111
|
+
| **13. OTP / MFA Code** | Valid unexpired code entry | Invalid code, expired code, partial length | Rate limiting (max attempts), resend cooldown timer |
|
|
112
|
+
| **14. Range Slider** | Drag slider between Min and Max | Snap-to values, boundary values (`Min`, `Max`) | Keyboard navigation (Arrow keys, Home, End, PageUp/Down) |
|
|
113
|
+
| **15. Rich Text Editor** | Bold, italic, bullet lists formatting | Image paste, rich content pasted from external apps | Dangerous HTML tags sanitization, raw character count |
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## 6. Standard Table Output Specification
|
|
118
|
+
|
|
119
|
+
All generated test cases must adhere to the 12-column Markdown specification:
|
|
120
|
+
|
|
121
|
+
```markdown
|
|
122
|
+
| TC ID | Module | Risk Level | Test Title | Pre-Condition | Test Steps | Expected Result | Priority | Test Data | Automatable | Auto Type | Tags |
|
|
123
|
+
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
|
|
124
|
+
| CRM_CUST_TC_001 | Customer | High | Verify create customer with valid data | 1. User logged in as Admin<br>2. On Customer page | 1. Click "New Customer"<br>2. Fill all mandatory fields<br>3. Click "Save" | 1. Alert "Customer added successfully"<br>2. Record visible in customer table | High | Company="AutoCorp", Phone="+123456789" | Yes | UI | @Smoke, @Regression |
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
> **Formatting Invariants:**
|
|
128
|
+
> - Numbered test steps and expected results must use `<br>` for multi-line formatting inside table cells.
|
|
129
|
+
> - `Risk Level`: `High`, `Medium`, `Low`.
|
|
130
|
+
> - `Priority`: `Critical`, `High`, `Medium`, `Low`.
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## 7. Export to Styled Excel (.xlsx)
|
|
135
|
+
|
|
136
|
+
Export Markdown test cases directly into styled Excel workbooks via the CLI tool:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
# Convert Markdown table into styled Excel
|
|
140
|
+
synapse export-excel path/to/test_cases.md -o output.xlsx --sheet-name "Regression Suite"
|
|
141
|
+
|
|
142
|
+
# Or via unified CLI dispatcher:
|
|
143
|
+
agent-qa export-excel path/to/test_cases.md
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Generated workbooks automatically include:
|
|
147
|
+
- Corporate Navy Blue header styling (`#1F4E78`, bold, white).
|
|
148
|
+
- Frozen header pane (`A2`) and enabled `AutoFilter`.
|
|
149
|
+
- Color-coded badges for Risk Level and Priority.
|
|
150
|
+
- Multi-line text wrapping and optimized column widths.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Example AI-RBT Manual Test Suite: E-Commerce Checkout
|
|
2
|
+
|
|
3
|
+
## 1. Risk Assessment Matrix (P x I)
|
|
4
|
+
|
|
5
|
+
| Feature / Journey | Probability (1-5) | Impact (1-5) | Risk Score (P x I) | Tier | Testing Focus |
|
|
6
|
+
| :--- | :--- | :--- | :--- | :--- | :--- |
|
|
7
|
+
| Payment Gateway Integration (Stripe/PayPal) | 4 | 5 | 20 | Critical (P1) | Idempotency, 3D Secure, Network timeout, Webhook retry |
|
|
8
|
+
| Promo Code & Discount Application | 3 | 4 | 12 | High (P2) | Boundary dates, Concurrent usage, Negative cart values |
|
|
9
|
+
| Shipping Address Form & Validation | 2 | 3 | 6 | Medium (P3) | XSS, Max length, International postal formats |
|
|
10
|
+
|
|
11
|
+
## 2. Requirement Clarification & Ambiguity Log
|
|
12
|
+
|
|
13
|
+
| ID | Ambiguity / Gap | Question to Product Owner | Impact / Default Assumption |
|
|
14
|
+
| :--- | :--- | :--- | :--- |
|
|
15
|
+
| AMB-01 | Discount expiration timezone not specified | Does promo code expire at 23:59 UTC or local user time? | Assumed UTC midnight to prevent premature expiration errors. |
|
|
16
|
+
| AMB-02 | Handling partial payment failure during multi-card checkout | Should the entire order roll back or allow secondary payment? | Assumed atomic rollback: no charge without full authorization. |
|
|
17
|
+
|
|
18
|
+
## 3. Comprehensive Manual Test Case Matrix (12-Column Standard)
|
|
19
|
+
|
|
20
|
+
| TC ID | Module | Risk Tier | Scenario / Title | Pre-Conditions | Test Data | Test Steps | Expected Result | Actual Result | Status | Priority | Traceability / AC |
|
|
21
|
+
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
|
|
22
|
+
| `TC-CHK-001` | Checkout | Critical (P1) | Successful Credit Card payment with 3DS authorization | User logged in, Cart has 1 item (\$45.00) | Valid Visa test card with 3DS challenge | 1. Navigate to /checkout<br>2. Fill shipping details<br>3. Enter 3DS card<br>4. Click 'Place Order'<br>5. Authorize OTP popup | Order confirmed, receipt email queued, cart emptied | As expected | PASS | P1 | AC-01, AC-04 |
|
|
23
|
+
| `TC-CHK-002` | Checkout | Critical (P1) | Idempotency under double-submit click on 'Place Order' | User on final payment step | Valid payment details | 1. Rapidly double-click 'Place Order' button within 100ms | Button disables on first click; exactly 1 payment transaction charged | As expected | PASS | P1 | NFR-SEC-02 |
|
|
24
|
+
| `TC-CHK-003` | Checkout | High (P2) | Expired coupon code validation | User on payment step with \$100 cart | Coupon: `SUMMER2020` (Expired) | 1. Enter coupon `SUMMER2020`<br>2. Click 'Apply' | Inline error: 'Coupon code has expired', total remains \$100 | As expected | PASS | P2 | AC-05 |
|
|
25
|
+
| `TC-CHK-004` | Checkout | Medium (P3) | XSS payload injection in Delivery Instructions field | User on shipping step | Notes: `<script>alert('xss')</script>` | 1. Enter payload in notes<br>2. Complete order<br>3. View order history | Payload safely HTML-escaped; no script execution in UI | As expected | PASS | P3 | OWASP-A03 |
|