frappe-testing

Installation
SKILL.md

Frappe Testing

Frappe ships a unittest-based harness with DB isolation. Tests run in a transaction that's rolled back, so they don't pollute the site.

Basic test

# myapp/myapp/doctype/widget/test_widget.py
import frappe
from frappe.tests.utils import FrappeTestCase

class TestWidget(FrappeTestCase):
    def test_creates_with_defaults(self):
        w = frappe.get_doc({"doctype": "Widget", "title": "A"}).insert()
        self.assertEqual(w.status, "Open")
Installs
27
GitHub Stars
18
First Seen
Jun 8, 2026