Generate integration tests for multi-DocType workflows in Frappe. Use when testing end-to-end workflows, state transitions, or complex business processes.
Generates comprehensive integration tests for multi-DocType workflows and end-to-end business processes in Frappe.
/plugin marketplace add Venkateshvenki404224/frappe-apps-manager/plugin install frappe-apps-manager@frappe-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Generate comprehensive integration tests for multi-DocType workflows and end-to-end business processes in Frappe.
Claude should invoke this skill when:
Complete Sales Workflow Test:
from frappe.tests.utils import FrappeTestCase
import frappe
class TestSalesWorkflow(FrappeTestCase):
def test_complete_sales_cycle(self):
"""Test end-to-end sales process"""
# 1. Create Customer
customer = self._create_test_customer()
# 2. Create Sales Order
so = self._create_sales_order(customer.name)
so.submit()
# 3. Create Sales Invoice from SO
si = self._make_sales_invoice_from_order(so.name)
si.insert()
si.submit()
# 4. Create Payment Entry
pe = self._create_payment_entry(si)
pe.insert()
pe.submit()
# Verify workflow completed
si.reload()
self.assertEqual(si.status, 'Paid')
self.assertEqual(si.outstanding_amount, 0)
def _create_test_customer(self):
return frappe.get_doc({
'doctype': 'Customer',
'customer_name': '_Test Customer',
'customer_group': 'Commercial'
}).insert()
def _create_sales_order(self, customer):
return frappe.get_doc({
'doctype': 'Sales Order',
'customer': customer,
'delivery_date': frappe.utils.add_days(frappe.utils.today(), 7),
'items': [{
'item_code': '_Test Item',
'qty': 10,
'rate': 100
}]
})
Test Document States:
class TestInvoiceStates(FrappeTestCase):
def test_invoice_state_transitions(self):
"""Test all possible state transitions"""
si = self._get_test_invoice()
# Draft state
si.insert()
self.assertEqual(si.docstatus, 0)
self.assertEqual(si.status, 'Draft')
# Submit transition
si.submit()
self.assertEqual(si.docstatus, 1)
self.assertEqual(si.status, 'Submitted')
# Cannot edit submitted
si.customer = 'Different Customer'
with self.assertRaises(frappe.ValidationError):
si.save()
# Cancel transition
si.cancel()
self.assertEqual(si.docstatus, 2)
self.assertEqual(si.status, 'Cancelled')
Integration Test Examples:
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.