Claude Skills
CollectionsCompareWorkflowsNominate
Sign inSign up
© 2026 Curated Agent Skills·Learn more about Agent Skills
Back to repository

frappe-test

verified

Create comprehensive test suites for Frappe Framework v15 applications. Triggers: "create tests", "add tests", "frappe test", "write tests", "test coverage", "/frappe-test". Generates unit tests, integration tests, fixtures, and factory patterns following testing best practices.

View on GitHub

Marketplace

bershadsky-claude-tools

sergio-bershadsky/ai

Plugin

frappe-dev

development

Repository

sergio-bershadsky/ai
4stars

plugins/frappe-dev/skills/frappe-test/SKILL.md

Last Verified

February 2, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/sergio-bershadsky/ai/blob/main/plugins/frappe-dev/skills/frappe-test/SKILL.md -a claude-code --skill frappe-test

Installation paths:

Claude
.claude/skills/frappe-test/
Powered by add-skill CLI

Instructions

# Frappe Testing Suite

Create comprehensive test coverage for Frappe v15 applications using pytest-compatible test classes, fixtures, and factory patterns.

## When to Use

- Adding test coverage to existing code
- Creating tests for new DocTypes/APIs/Services
- Setting up test fixtures and factories
- Writing integration tests with database access
- Creating unit tests without database dependency

## Arguments

```
/frappe-test <target> [--type <unit|integration|e2e>] [--coverage]
```

**Examples:**
```
/frappe-test SalesOrder
/frappe-test inventory_service --type unit
/frappe-test api.orders --type integration --coverage
```

## Procedure

### Step 1: Analyze Test Target

Identify what needs to be tested:

1. **DocType** — Controller lifecycle hooks, validation, business rules
2. **Service** — Business logic, orchestration, error handling
3. **Repository** — Data access patterns, queries
4. **API** — Endpoints, authentication, input validation
5. **Utility** — Helper functions, formatters

### Step 2: Determine Test Strategy

Based on target, determine appropriate test types:

| Component | Unit Test | Integration Test | E2E Test |
|-----------|-----------|------------------|----------|
| DocType Controller | ✓ (hooks) | ✓ (full lifecycle) | — |
| Service Layer | ✓ (logic) | ✓ (with DB) | — |
| Repository | — | ✓ (queries) | — |
| API Endpoint | ✓ (validation) | ✓ (full request) | ✓ |
| Utility Functions | ✓ | — | — |

### Step 3: Generate Test Structure

Create test directory structure:

```
<app>/tests/
├── __init__.py
├── conftest.py           # Pytest fixtures
├── factories/            # Test data factories
│   ├── __init__.py
│   └── <doctype>_factory.py
├── unit/                 # Unit tests (no DB)
│   ├── __init__.py
│   └── test_<module>.py
├── integration/          # Integration tests (with DB)
│   ├── __init__.py
│   └── test_<module>.py
└── e2e/                  # End-to-end tests
    └── test_workflows.py
```

### Step 4: Generate conftest.py (Pytest

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
21529 chars