मुख्य सामग्री पर जाएँ
Skillpedia
टेस्टिंग81k · #1701

tdd-workflow

यह क्या करती है

यह स्किल London स्कूल शैली में test-driven development चक्र का मार्गदर्शन करती है, जहाँ निर्भरताओं को पहले mock किया जाता है। यह उन डेवलपर्स के लिए है जो टेस्ट के नेतृत्व में फ़ीचर चरण-दर-चरण बनाना चाहते हैं।

कब इस्तेमाल करें

  • ✓जब आप फ़ीचर को बाहर से अंदर की ओर, टेस्ट पहले लिखकर बनाना चाहते हैं।
  • ✓जब आप किसी नए व्यवहार के लिए स्पष्ट red, green, refactor क्रम चाहते हैं।
  • ✓जब किसी कार्य को पूरा घोषित करने से पहले अंतिम टेस्ट परिणाम जाँचने हों।

Skill का लिंक

https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-testgen/skills/tdd-workflow/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-testgen/skills/tdd-workflow/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“discount calculation को टेस्ट पहले लिखकर बनाइए, mocked pricing service के लिए एक विफल टेस्ट से शुरू करके।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

स्किल mocked निर्भरताओं के साथ एक विफल टेस्ट लिखती है, उसे चलाकर देखती है कि वह सही कारण से विफल हो रहा है, फिर उसे पास करने वाला सबसे सरल कोड लिखती है, और फिर refactor करती है। सफलता घोषित करने से पहले वह लक्ष्य और regression टेस्ट चलाती है और असली परिणाम दर्ज करती है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Follow the TDD London School (mock-first) approach:

  1. Write the failing test first -- define expected behavior with mocked dependencies
  2. Run the test -- confirm it fails for the right reason
  3. Implement minimal code -- make the test pass with the simplest solution
  4. Refactor -- clean up while keeping tests green
  5. Repeat -- add the next behavior

Before starting: mcp__plugin_ruflo-core_ruflo__hooks_pre-task({ description: "TDD: FEATURE_NAME" }) Before reporting the outcome, run the final target tests and the regression suite after the last edit. Record the actual commands, exit codes, whether tests ran, and failing test names. The initial red test is expected during TDD; only the final validation determines success.

Call mcp__plugin_ruflo-core_ruflo__hooks_post-task with the observed result, including when the task is abandoned or validation is interrupted. Set completed, targetTestsRan, and regressionTestsRan to true only when observed; use null for missing exit codes. Skipped or unrun validation is not success. Never substitute an expected result for an observed one.

The following example maps those observations to the hook input (tool-call notation):

const success = completed && targetTestsRan && regressionTestsRan
  && targetExitCode === 0 && regressionExitCode === 0;
mcp__plugin_ruflo-core_ruflo__hooks_post-task({
  taskId: "tdd-FEATURE",
  success,
  storeResults: true,
  task: JSON.stringify({
    feature: "FEATURE",
    targetCommand, targetExitCode, targetTestsRan,
    regressionCommand, regressionExitCode, regressionTestsRan,
    failingTestNames,
    failureReason: success ? null : failureReason
  })
});

On failure, report success: false and the failing test names in task. If the runner failed before identifying tests, or the task was abandoned, state that reason instead of inventing test names.

Principles:

  • Mock external dependencies at boundaries
  • Test behavior, not implementation
  • One assertion per test when possible
  • Descriptive names: should [behavior] when [condition]
अक्सर पूछे जाने वाले सवाल

क्या शुरुआती विफल टेस्ट समस्या है?

नहीं। स्रोत कहता है कि इस तरीके में पहला लाल टेस्ट अपेक्षित है। सिर्फ़ अंतिम सत्यापन सफलता तय करता है।

सफलता किसे माना जाता है?

लक्ष्य टेस्ट और regression suite, दोनों असल में चलें और पास हों। छोड़े गए टेस्ट सफलता नहीं हैं।

क्या यह परिणाम दर्ज करता है?

हाँ। यह कार्य का परिणाम देखे गए परिणामों के साथ memory hooks को भेजता है।

जानकारी

लेखक का मूल विवरण

TDD London School workflow -- mock-first, outside-in test development

repo: ruvnet/ruflo

लोकप्रियता

GitHub स्टार
81k
रैंकिंग में स्थान
#1701
लाइसेंस
MIT
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

agent-adaptive-coordinator

81k

आपके एजेंट को काम बदलने पर AI एजेंटों के समूह को बाँटने और फिर से संतुलित करने में मदद करती है, और काम के हिसाब से लेआउट चुनती है।

AI और एजेंटएजेंट

agent-agent

81k

आपके एजेंट को बड़े लक्ष्य को क्रमबद्ध कार्यों की योजना में बदलना सिखाती है, और स्थिति बदलने पर योजना फिर से बनाना भी।

AI और एजेंटएजेंट

agent-agentic-payments

81k

AI खरीदारी के लिए खर्च के आदेश मैनेज करने में मदद करती है, जिसमें खर्च की सीमा, समय अवधि, व्यापारी नियम और signed मंज़ूरियाँ शामिल हैं।

AI और एजेंटएजेंट

agent-analyze-code-quality

81k

आपके एजेंट को कोड की गुणवत्ता जाँचने में मदद करती है, बिना फ़ाइलें बदले code smells, technical debt और refactoring के सुझाव खोजकर।

कोडिंगसामान्य कोडिंग

मिलती-जुलती skills