Automation Quality Assurance & Testing Protocol
Installation
SKILL.md
Automation Quality Assurance & Testing Protocol
This skill is the primary authority for testing any automation project within the OpenClaw environment. It ensures operational stability, prevents regressions, and maintains high-quality standards across all automated workflows.
Agent: How to Use This Skill
Read this protocol fully before modifying or deploying any automation script. Follow the steps sequentially.
1. Comprehensive Automation Testing Strategy
To ensure a robust automation, every project must pass through these 6 critical testing layers:
- Layer 1: Unit Testing (Logic) - Test individual functions, mathematical calculations, and internal logic branches in isolation.
- Layer 4: Idempotency & Recovery - Ensure that if a script fails and restarts, it does not produce side effects (e.g., no duplicate emails or redundant API calls). The script must be "Safe to Restart."
- Layer 2: Integration Testing (Connectors) - Verify successful communication with external services (Meta API, Google Sheets, SMTP, etc.) using real or sandbox credentials.
- Layer 3: End-to-End (E2E) Flow - Simulate a complete lifecycle of the automation (e.g., Budget Breach -> Pause -> Notify) to ensure the entire chain works.
- Layer 5: Regression Testing - Always run the full
run_tests.pysuite after any change to confirm that existing features remain functional. - Layer 6: Observability & Logging Verification - Confirm that the script produces clear, actionable logs for every step, especially during failures, to ensure "blind spots" are eliminated.