← Back to Skills Marketplace
gechengling

Ai Test Strategy Architect

by lingfeng-19 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
102
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install ai-test-strategy-architect
Description
AI-powered test strategy and automation assistant — design comprehensive testing frameworks, generate unit/integration/e2e test cases, implement test automat...
README (SKILL.md)

\r \r

AI Test Strategy Architect\r

\r

Overview\r

\r Build testing that catches bugs before users do. This AI-powered testing assistant designs robust test strategies, generates comprehensive test cases, and implements automation frameworks—turning quality assurance from a bottleneck into a competitive advantage.\r \r

Triggers\r

\r

  • 中文触发词:测试策略单元测试集成测试E2E测试自动化测试测试用例TDDBDDPlaywright测试Selenium测试覆盖率\r
  • English triggers: test strategy, unit testing, integration testing, e2e testing, automated testing, test cases, TDD, BDD, Playwright, Selenium, test coverage, CI/CD testing\r \r

Features\r

\r

1. Test Strategy Design\r

  • Assess project requirements and risk profiles\r
  • Design tailored testing pyramids (unit/integration/e2e ratios)\r
  • Select appropriate testing frameworks per use case\r
  • Define test data management strategies\r
  • Create test environment specifications\r \r

2. Test Case Generation\r

  • Generate unit tests from code functions/methods\r
  • Create integration test scenarios from API specs\r
  • Design end-to-end user journey tests\r
  • Build property-based tests for edge cases\r
  • Generate negative test cases (error handling)\r \r

3. Test Automation Implementation\r

  • Scaffold test projects with proper structure\r
  • Implement page object models for UI tests\r
  • Set up API test frameworks with data-driven approaches\r
  • Configure test parallelization and distribution\r
  • Implement visual regression testing\r \r

4. CI/CD Pipeline Integration\r

  • Design testing stages in CI/CD pipelines\r
  • Configure test reporting and dashboards\r
  • Set up automated quality gates\r
  • Implement canary/feature flag testing strategies\r
  • Create performance test thresholds in pipelines\r \r

Workflow\r

\r

Comprehensive Test Strategy Workflow\r

\r

Phase 1: Assessment\r
├── Analyze project architecture\r
├── Identify critical user flows\r
├── Assess technical risks\r
├── Define quality metrics\r
└── Select testing tools\r
\r
Phase 2: Design\r
├── Design test pyramid\r
├── Define test scope per layer\r
├── Create test data strategy\r
├── Document test environment needs\r
└── Plan test automation approach\r
\r
Phase 3: Implementation\r
├── Set up test project structure\r
├── Implement unit tests\r
├── Build integration test suite\r
├── Create e2e test scenarios\r
└── Configure test runners\r
\r
Phase 4: Automation\r
├── Integrate with CI/CD\r
├── Set up test reporting\r
├── Configure parallel execution\r
├── Implement test monitoring\r
└── Create quality dashboards\r
\r
Phase 5: Maintenance\r
├── Review test effectiveness\r
├── Optimize slow tests\r
├── Update for new features\r
└── Archive obsolete tests\r
```\r
\r
### Quick Test Generation Workflow\r
\r
```\r
1. INPUT: Source code or feature description\r
   ↓\r
2. ANALYZE: Identify testable units\r
   - Functions/methods\r
   - User interactions\r
   - API endpoints\r
   ↓\r
3. GENERATE: Create test cases\r
   - Happy path scenarios\r
   - Edge cases\r
   - Error scenarios\r
   - Boundary conditions\r
   ↓\r
4. VALIDATE: Run tests, fix failures\r
   ↓\r
5. OPTIMIZE: Improve coverage and speed\r
```\r
\r
## Input Examples\r
\r
### Example 1: Function to Unit Test\r
\r
**Input Code:**\r
```python\r
def calculate_discount(price: float, discount_percent: float, is_loyal: bool) -> float:\r
    """\r
    Calculate final price after discount.\r
    \r
    Args:\r
        price: Original price\r
        discount_percent: Discount percentage (0-100)\r
        is_loyal: Whether customer is a loyalty member\r
    \r
    Returns:\r
        Final price after discount\r
    """\r
    if price \x3C 0:\r
        raise ValueError("Price cannot be negative")\r
    if discount_percent \x3C 0 or discount_percent > 100:\r
        raise ValueError("Discount must be between 0 and 100")\r
    \r
    discount_multiplier = 1 - (discount_percent / 100)\r
    \r
    if is_loyal:\r
        # Loyalty members get extra 5% off\r
        final_multiplier = discount_multiplier * 0.95\r
    else:\r
        final_multiplier = discount_multiplier\r
    \r
    return round(price * final_multiplier, 2)\r
```\r
\r
**Generated Test Cases:**\r
```python\r
import pytest\r
from your_module import calculate_discount\r
\r
class TestCalculateDiscount:\r
    """Unit tests for calculate_discount function"""\r
    \r
    # Happy path tests\r
    def test_no_discount_returns_original_price(self):\r
        """No discount should return the original price"""\r
        assert calculate_discount(100.00, 0, False) == 100.00\r
    \r
    def test_standard_discount(self):\r
        """Basic discount calculation"""\r
        assert calculate_discount(100.00, 20, False) == 80.00\r
    \r
    def test_loyal_customer_extra_discount(self):\r
        """Loyal customers get additional 5% off"""\r
        result = calculate_discount(100.00, 20, True)\r
        expected = round(100 * 0.80 * 0.95, 2)  # 76.00\r
        assert result == expected\r
    \r
    def test_full_discount(self):\r
        """100% discount should result in 0"""\r
        assert calculate_discount(100.00, 100, False) == 0.00\r
    \r
    # Edge cases\r
    def test_zero_price(self):\r
        """Zero price should return zero"""\r
        assert calculate_discount(0.00, 50, False) == 0.00\r
    \r
    def test_rounding_to_cents(self):\r
        """Prices should round to 2 decimal places"""\r
        result = calculate_discount(99.99, 33, False)\r
        assert result == round(99.99 * 0.67, 2)\r
    \r
    # Error cases\r
    def test_negative_price_raises_error(self):\r
        """Negative price should raise ValueError"""\r
        with pytest.raises(ValueError, match="Price cannot be negative"):\r
            calculate_discount(-10.00, 10, False)\r
    \r
    def test_negative_discount_raises_error(self):\r
        """Negative discount should raise ValueError"""\r
        with pytest.raises(ValueError, match="Discount must be between"):\r
            calculate_discount(100.00, -5, False)\r
    \r
    def test_over_100_discount_raises_error(self):\r
        """Discount over 100% should raise ValueError"""\r
        with pytest.raises(ValueError, match="Discount must be between"):\r
            calculate_discount(100.00, 150, False)\r
    \r
    # Boundary tests\r
    def test_boundary_zero_percent_discount(self):\r
        """0% is valid discount"""\r
        assert calculate_discount(50.00, 0, False) == 50.00\r
    \r
    def test_boundary_hundred_percent_discount(self):\r
        """100% is valid discount"""\r
        assert calculate_discount(50.00, 100, False) == 0.00\r
```\r
\r
### Example 2: API Integration Test\r
\r
**Input:** OpenAPI endpoint definition\r
```yaml\r
paths:\r
  /api/v1/users/{userId}/orders:\r
    get:\r
      summary: Get user orders\r
      parameters:\r
        - name: userId\r
          in: path\r
          required: true\r
          schema:\r
            type: string\r
        - name: status\r
          in: query\r
          schema:\r
            type: string\r
            enum: [pending, shipped, delivered]\r
      responses:\r
        '200':\r
          description: List of orders\r
        '401':\r
          description: Unauthorized\r
        '404':\r
          description: User not found\r
```\r
\r
**Generated Integration Test:**\r
```python\r
import pytest\r
import requests\r
from typing import Dict\r
\r
BASE_URL = "https://api.example.com"\r
HEADERS = {"Authorization": "Bearer \x3Ctest_token>"}\r
\r
class TestUserOrdersAPI:\r
    """Integration tests for User Orders endpoint"""\r
    \r
    @pytest.fixture\r
    def test_user_id(self):\r
        """Fixture providing a test user with known orders"""\r
        return "user_123"\r
    \r
    def test_get_orders_success(self, test_user_id: str):\r
        """Should return 200 with list of orders"""\r
        response = requests.get(\r
            f"{BASE_URL}/api/v1/users/{test_user_id}/orders",\r
            headers=HEADERS\r
        )\r
        \r
        assert response.status_code == 200\r
        data = response.json()\r
        assert "orders" in data\r
        assert isinstance(data["orders"], list)\r
    \r
    def test_get_orders_with_status_filter(self, test_user_id: str):\r
        """Should filter orders by status"""\r
        response = requests.get(\r
            f"{BASE_URL}/api/v1/users/{test_user_id}/orders",\r
            params={"status": "pending"},\r
            headers=HEADERS\r
        )\r
        \r
        assert response.status_code == 200\r
        orders = response.json()["orders"]\r
        assert all(order["status"] == "pending" for order in orders)\r
    \r
    def test_get_orders_unauthorized(self, test_user_id: str):\r
        """Should return 401 without valid token"""\r
        response = requests.get(\r
            f"{BASE_URL}/api/v1/users/{test_user_id}/orders"\r
        )\r
        \r
        assert response.status_code == 401\r
    \r
    def test_get_orders_user_not_found(self):\r
        """Should return 404 for non-existent user"""\r
        response = requests.get(\r
            f"{BASE_URL}/api/v1/users/nonexistent_user/orders",\r
            headers=HEADERS\r
        )\r
        \r
        assert response.status_code == 404\r
        assert "error" in response.json()\r
```\r
\r
### Example 3: E2E Test with Playwright\r
\r
**Input:** User journey description\r
```\r
User flow: Login -> Add item to cart -> Checkout -> Verify order confirmation\r
```\r
\r
**Generated E2E Test:**\r
```python\r
import pytest\r
from playwright.sync_api import Page, expect\r
\r
@pytest.fixture\r
def logged_in_page(page: Page):\r
    """Fixture that logs in user before each test"""\r
    page.goto("https://shop.example.com/login")\r
    page.fill('[name="email"]', "[email protected]")\r
    page.fill('[name="password"]', "testpassword123")\r
    page.click('[type="submit"]')\r
    page.wait_for_url("**/dashboard")\r
    return page\r
\r
def test_complete_checkout_flow(logged_in_page: Page):\r
    """End-to-end test: Login -> Add to cart -> Checkout -> Confirmation"""\r
    page = logged_in_page\r
    \r
    # Step 1: Browse to product\r
    page.goto("https://shop.example.com/products/widget-pro")\r
    page.click('[data-testid="add-to-cart"]')\r
    \r
    # Step 2: Verify cart\r
    page.click('[data-testid="cart-icon"]')\r
    expect(page.locator('[data-testid="cart-item"]')).toHaveCount(1)\r
    \r
    # Step 3: Proceed to checkout\r
    page.click('[data-testid="checkout-button"]')\r
    page.fill('[name="shipping_address"]', "123 Test Street")\r
    page.fill('[name="zip_code"]', "12345")\r
    page.click('[data-testid="continue-payment"]')\r
    \r
    # Step 4: Complete payment\r
    page.fill('[name="card_number"]', "4242424242424242")\r
    page.fill('[name="expiry"]', "12/28")\r
    page.fill('[name="cvv"]', "123")\r
    page.click('[data-testid="place-order"]')\r
    \r
    # Step 5: Verify confirmation\r
    expect(page.locator('[data-testid="order-confirmation"]')).toBeVisible()\r
    expect(page.locator('[data-testid="order-number"]')).not_toBeEmpty()\r
```\r
\r
## Output Templates\r
\r
### Template: Test Strategy Document\r
```markdown\r
# Test Strategy Document\r
\r
## Project Overview\r
- Project Name: [Name]\r
- Version: [Version]\r
- Test Scope: [What's in/out]\r
\r
## Quality Objectives\r
| Metric | Target | Measurement |\r
|--------|--------|-------------|\r
| Code Coverage | >80% | Codecov |\r
| Bug Escape Rate | \x3C5% | Bug Tracker |\r
| Test Execution Time | \x3C10 min | CI Pipeline |\r
\r
## Test Pyramid\r
\r
        ╱╲\r
       ╱  ╲\r
      ╱ E2E╲         [Few - 10%]\r
     ╱──────╲\r
    ╱Integration╲     [Some - 30%]\r
   ╱────────────╲\r
  ╱  Unit Tests  ╲   [Many - 60%]\r
 ╱────────────────╲\r
\r
## Testing Tools\r
\r
| Layer | Tool | Language |\r
|-------|------|----------|\r
| Unit | Pytest | Python |\r
| Integration | pytest | Python |\r
| E2E | Playwright | TypeScript |\r
| API | REST Assured | Java |\r
\r
## Test Environments\r
- Dev: https://dev.example.com\r
- Staging: https://staging.example.com\r
- Production: https://example.com\r
\r
## Test Data Strategy\r
- [Strategy details]\r
\r
## Release Criteria\r
- [ ] All critical tests pass\r
- [ ] Coverage meets target\r
- [ ] No P0 bugs open\r
```\r
\r
## Best Practices\r
\r
### For Test Design\r
1. **Follow FIRST principles:** Fast, Independent, Repeatable, Self-validating, Timely\r
2. **Name tests descriptively:** `test_user_cannot_login_with_invalid_password`\r
3. **Test one thing per test:** Easier debugging and maintenance\r
4. **Use data-driven tests:** Reduce duplication with parameterized tests\r
5. **Test edge cases:** Empty inputs, null values, maximum limits\r
\r
### For Test Automation\r
1. **Prioritize stability:** Flaky tests are worse than no tests\r
2. **Keep tests fast:** Slow tests don't run often\r
3. **Use page objects:** Encapsulate UI structure changes\r
4. **Isolate tests:** No shared state between tests\r
5. **Clean up after yourself:** Reset what you change\r
\r
### For CI/CD Integration\r
1. **Fail fast:** Run fastest tests first\r
2. **Parallelize:** Split tests across workers\r
3. **Report properly:** Generate actionable reports\r
4. **Set quality gates:** Block releases below thresholds\r
5. **Monitor trends:** Track flakiness over time\r
\r
## Testing Framework Comparison\r
\r
| Framework | Best For | Languages |\r
|-----------|----------|-----------|\r
| Pytest | Python APIs, unit tests | Python |\r
| Jest | JavaScript/TypeScript | JS/TS |\r
| JUnit 5 | Java applications | Java |\r
| Playwright | Web E2E testing | TS, Python |\r
| Cypress | Web E2E testing | JS/TS |\r
| Selenium | Legacy browser testing | Multi |\r
| REST Assured | API testing | Java, Groovy |\r
| SuperTest | Node.js API testing | JavaScript |\r
\r
## Version History\r
\r
- **1.0.0** (2026-05-15): Initial release\r
  - Test strategy design framework\r
  - Unit test generation\r
  - Integration test scaffolding\r
  - E2E test patterns (Playwright)\r
  - CI/CD integration guidance\r
Usage Guidance
Treat this as an incomplete low-confidence review: the available prompt context contained no skill artifact contents, and local file inspection failed with a sandbox error, so install only after confirming the actual SKILL.md, metadata, install spec, and artifact files are coherent and scoped.
Capability Tags
cryptocan-make-purchases
Capability Assessment
Purpose & Capability
No provided artifact evidence shows a mismatch between purpose and capability.
Instruction Scope
No provided artifact evidence shows hidden instructions, goal hijacking, or unsafe automatic execution.
Install Mechanism
No provided artifact evidence shows a risky install mechanism or untrusted execution path.
Credentials
No provided artifact evidence shows overbroad environment access or disproportionate local/system authority.
Persistence & Privilege
No provided artifact evidence shows persistence, privilege abuse, or credential/session handling.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install ai-test-strategy-architect
  3. After installation, invoke the skill by name or use /ai-test-strategy-architect
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
AI Test Strategy Architect 1.0.0 - Initial release of an AI-powered assistant for comprehensive test strategy and automation. - Designs robust testing frameworks for unit, integration, and end-to-end (E2E) testing across web, mobile, and API applications. - Generates test cases, implements automation (including TDD, BDD, property-based testing), and integrates with CI/CD pipelines. - Supports multiple frameworks and tools (Selenium, Playwright, Pytest, Jest). - Offers workflows for test strategy development and quick test case generation. - Provides seamless prompts and triggers in both English and Chinese for ease of use.
Metadata
Slug ai-test-strategy-architect
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Ai Test Strategy Architect?

AI-powered test strategy and automation assistant — design comprehensive testing frameworks, generate unit/integration/e2e test cases, implement test automat... It is an AI Agent Skill for Claude Code / OpenClaw, with 102 downloads so far.

How do I install Ai Test Strategy Architect?

Run "/install ai-test-strategy-architect" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Ai Test Strategy Architect free?

Yes, Ai Test Strategy Architect is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Ai Test Strategy Architect support?

Ai Test Strategy Architect is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Ai Test Strategy Architect?

It is built and maintained by lingfeng-19 (@gechengling); the current version is v1.0.0.

💬 Comments