Tdd practitioner
Skill AtulPurohit/Antigravity-Awesome-Skills/plugins/dx-qa-automation/skills/tdd-practitioner
Installable GitHub library of 300+ professional agentic skills for Claude Code, Antigravity IDE, Gemini CLI, Cursor, and Copilot. Features a custom NPX installer, 9 stack-specific bundles, validation schemas, security auditing, and an interactive catalog explorer app.
npx -y skills add AtulPurohit/Antigravity-Awesome-Skills --skill tdd-practitionerAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
3 things to look at
- 26 days oldThe repository was created 26 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Practice Test-Driven Development with the red-green-refactor cycle. Write tests before code to drive better design, coverage, and confidence.
SKILL.md
2.8 KB, as published. Nobody here has run it
TDD Practitioner
Purpose
Write better, more reliable code by letting tests drive the implementation through the red-green-refactor cycle.
The TDD Cycle
Red → Green → Refactor
1. RED: Write a failing test for the next small piece of behavior
2. GREEN: Write the minimum code to make it pass
3. REFACTOR: Clean up without breaking tests
Repeat...
1️⃣ Writing a Good Unit Test (AAA Pattern)
def test_order_calculates_total_with_discount():
# ARRANGE: Set up the system under test
items = [
OrderItem(product_id="A", quantity=2, price=Money("25.00")),
OrderItem(product_id="B", quantity=1, price=Money("50.00")),
]
discount = PercentageDiscount(rate=Decimal("0.10")) # 10% off
order = Order(items=items, discount=discount)
# ACT: Perform the action
total = order.calculate_total()
# ASSERT: Verify the outcome
assert total == Money("90.00") # (25*2 + 50) * 0.9 = 90
2️⃣ Test Quality Checklist
- Tests one thing (single assertion concept)
- Test name describes behavior:
test_[method]_[scenario]_[expected_result] - Independent — no test depends on another
- Fast — no I/O, no external calls
- Deterministic — same result every run
- Tests behavior, not implementation details
3️⃣ Test Doubles
# Mock (verify interactions)
mock_email = Mock()
service = UserService(email_sender=mock_email)
service.register(email="[email protected]")
mock_email.send.assert_called_once_with(
to="[email protected]",
subject="Welcome!"
)
# Stub (provide canned responses)
stub_repo = Mock()
stub_repo.find_by_email.return_value = User(id=1, email="[email protected]")
# Fake (simplified working implementation)
class InMemoryOrderRepository:
def __init__(self): self._store = {}
def save(self, order): self._store[order.id] = order
def find(self, id): return self._store.get(id)
4️⃣ Outside-In TDD (Starting with Acceptance Tests)
1. Write failing acceptance test (high level behavior)
2. Write failing unit tests for components needed
3. Implement until unit tests pass
4. Run acceptance test — keep going until it passes
5. Refactor
Outputs
- Test suite for specified feature
- Mock/stub configuration
- Test helpers and builders
- Coverage report analysis
- TDD workflow documentation