frappe-doctype-tests
Installation
SKILL.md
Frappe DocType Tests
See frappe-doctype-schema for the .json schema.
See frappe-doctype-controller for the .py server controller.
See frappe-doctype-form-view for the .js form controller.
See frappe-doctype-list-view for the _list.js list view controller.
Full API reference, assertion helpers, context managers, and CLI flags: REFERENCE.md.
Mandatory workflow
Before writing any test, complete these steps in order:
- Read the controller (
.py) — identify hooks, validations, computed fields, whitelisted methods - Read the schema (
.json) — identify fields, child tables, link fields,is_submittable, mandatory fields - Write the test (
test_{doctype}.py) in the same doctype folder - Run with
bench run-tests --module "app_name.module.doctype.my_doctype.test_my_doctype"