tdd
tdd guides you through mandatory test-driven development across all Prowler components using the red-green-refactor cycle. Learn to write failing tests first, implement minimum code to pass, triangulate with edge cases, and refactor with confidence. Covers TypeScript/React, Python SDK, and Django API stacks with practical examples.
tdd teaches the red-green-refactor cycle for test-driven development across Prowler's UI, SDK, and API components.
AI-generated summary based on this skill's SKILL.md
Decision gist · record as of 2026-07-27
tdd teaches the red-green-refactor cycle for test-driven development across Prowler's UI, SDK, and API components. tdd guides you through mandatory test-driven development across all Prowler components using the red-green-refactor cycle. Learn to write failing tests first, implement minimum code to pass, triangulate with edge cases, and refactor with confidence. Covers TypeScript/React, Python SDK, and Django API stacks with practical examples.
Use it when
- tdd teaches you to write failing tests before any implementation.
- tdd covers unit test coverage for the Prowler SDK using pytest with moto for AWS mocking.
Verify before relying
Read SKILL.md below before installing (1 file). Open directory: indexed for reading, not audited.
Install
prowler-cloud/prowler/tdd · repository language: Python
Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.
Frequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
What is the tdd skill's test driven development workflow?
tdd guides you through the red-green-refactor cycle across all Prowler components. You write a failing test first, implement minimum code to pass it, then refactor with confidence. This mandatory workflow ensures quality and safety throughout TypeScript/React, Python SDK, and Django API stacks.
How do you write tests first in the TDD cycle red green refactor?
tdd teaches you to write failing tests before any implementation. Start by defining what your code should do via a test that fails, then write only the minimum code needed to make it pass, and finally refactor safely. This approach prevents over-engineering and catches bugs early.
How does tdd help with pytest moto testing and prowler SDK coverage?
tdd covers unit test coverage for the Prowler SDK using pytest with moto for AWS mocking. You learn to set up proper test stacks, use fixtures and mocking effectively, and ensure comprehensive coverage across SDK components while following the red-green-refactor discipline.
What anti-patterns does tdd help you avoid in testing?
tdd teaches you to avoid hardcoding fake implementations and ensures triangulation with multiple test cases for edge cases and boundary values. You learn to write meaningful tests that catch real bugs rather than tests that simply pass, maintaining quality throughout refactoring.
Can tdd help set up testing for UI and API components?
Yes, tdd covers testing setup for UI (TypeScript/vitest with React Testing Library), SDK (Python pytest with moto), and API (Django pytest). You learn proper stacks and workflows for each component type, ensuring test-driven development practices across your entire Prowler codebase.
How does tdd enable safe refactoring with test coverage?
tdd provides a safety net through comprehensive test coverage built during development. Once your test suite passes, you can refactor code confidently knowing tests will catch any regressions. This approach lets you improve code quality without fear of breaking functionality.
SKILL.md
Rendered from the published skill. Quoted content, verbatim.
TDD Cycle (MANDATORY)
+-----------------------------------------+
| RED -> GREEN -> REFACTOR |
| ^ | |
| +------------------------+ |
+-----------------------------------------+
The question is NOT "should I write tests?" but "what tests do I need?"
The Three Laws of TDD
- No production code until you have a failing test
- No more test than necessary to fail
- No more code than necessary to pass
Detect Your Stack
Before starting, identify which component you're working on:
| Working in | Stack | Runner | Test
(truncated - see the full file via the links below)
File tree — 1 file
skills/tdd/SKILL.md
Let your AI agent find skills like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.
wish › “Learn test-driven development workflow and red-green-refactor cycle”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
This skill documents testing conventions for Prowler SDK checks and services across multiple cloud providers. It covers AWS testing with moto mocking, Azure and GCP testing with MagicMock, and establishes provider-specific patterns for fixtures, client patching, and assertion structures.
This skill equips you with battle-tested patterns for writing Prowler API tests, covering JSON:API request formatting, cross-tenant isolation via row-level security, role-based access control, and Celery task mocking. It includes a fixture dependency chain, response status code reference, and explicit rules for avoiding common pitfalls like TruffleHog false positives and incorrect content-type headers.
Prowler-ui equips you with the component patterns and design principles that power Prowler's cloud security platform. Learn the established conventions for building cohesive user interfaces and maintaining design consistency across the ecosystem. This skill bridges the gap between raw components and production-ready UI architecture.
prowler-ci guides you through Prowler's CI and PR gate system, helping diagnose why GitHub Actions workflows fail. It covers PR title validation, changelog requirements, conflict marker detection, and secret scanning—with a quick reference map to key workflow files and a practical debug checklist.
This skill guides implementation of Prowler's multi-tenant API architecture, covering row-level security enforcement, role-based access control, provider validation, and async task patterns. Learn the 4-database setup, RLS model constraints, M2M through-model requirements, and critical decorator ordering for tenant-isolated operations.
This skill audits Django migration files against PostgreSQL safety rules, catching common mistakes like bundling index creation with model definitions, mixing indexes across tables, and mishandling partitioned table indexes. It enforces separation of concerns—structural changes in one migration, performance indexes in another—and provides the two-step pattern required for partitioned tables to ensure indexes apply to all existing partitions without locking production data.
More skills testing-quality-standards (MIT) · vitest (Apache-2.0) · prowler-provider (Apache-2.0) · skill-creator (Apache-2.0)