Download the PHP package grazulex/laravel-tddraft without Composer
On this page you can find all versions of the php package grazulex/laravel-tddraft. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download grazulex/laravel-tddraft
More information about grazulex/laravel-tddraft
Files in grazulex/laravel-tddraft
Package laravel-tddraft
Short Description A powerful Laravel package that provides LaravelTddraft functionality with modern PHP 8.3+ features.
License MIT
Homepage https://github.com/grazulex/laravel-tddraft
Informations about the package laravel-tddraft
Laravel TDDraft
A Laravel package that enables safe Test-Driven Development with isolated draft testing, unique reference tracking, and powerful filtering options for professional TDD workflows.
๐ Table of Contents
- Overview
- โจ Features
- ๐ฆ Installation
- ๐ Quick Start
- ๐ง Five-Command TDD Workflow
- ๐ Filter and Group Options
- ๐ Documentation
- ๐ก Examples
- ๐งช Testing
- ๐ง Requirements
- ๐ค Contributing
- ๐ Security
- ๐ License
Overview
Laravel TDDraft enables true Test-Driven Development in Laravel applications by providing a separate, isolated testing environment where you can practice the Red-Green-Refactor cycle without affecting your CI pipeline or breaking team builds.
The key innovation is the five-command workflow that separates experimental draft tests from production tests, with powerful filtering and status tracking to manage your TDD process professionally.
๐๏ธ Test Architecture & Isolation
Laravel TDDraft creates a completely separate testing environment that doesn't interfere with your existing test suite:
Key Architectural Benefits:
- ๐ซ Zero CI Interference: TDDraft tests in
tests/TDDraft/
are completely excluded from your main test suites - ๐ Independent Operation: Your existing
tests/Unit/
andtests/Feature/
continue working exactly as before - ๐ Separate Test Suites: PHPUnit/Pest configuration keeps TDDraft isolated via test suite definitions
- โก Parallel Development: Teams can practice TDD in the draft environment while CI runs production tests
How Isolation Works:
Standard PHPUnit/Pest Configuration:
TDDraft Tests Run Separately:
This architectural separation ensures that failing TDDraft tests never break your CI builds while you practice the Red-Green-Refactor cycle.
๐ฏ Why Laravel TDDraft?
TDD is hard to practice in real projects because:
- Writing failing tests breaks CI builds and affects the team
- Experimental tests clutter your main test suite
- There's no easy way to track test evolution during TDD cycles
- Promoting draft tests to production requires manual work
Laravel TDDraft solves these problems with:
- โ Isolated Draft Testing - Separate test environment that never affects CI
- โ Unique Reference Tracking - Every test gets a trackable ID for evolution monitoring
- โ Powerful Filtering - Advanced options to filter tests by type, path, status, and reference
- โ Status Tracking - Automatic monitoring of test results and history
- โ Automated Promotion - Easy graduation from draft to production tests
- โ Professional Workflow - Structured five-command process for TDD adoption
โจ Features
- ๐๏ธ Complete Test Isolation -
tests/TDDraft/
directory completely separate fromtests/Unit/
andtests/Feature/
- never affects CI - ๐ Unique Reference Tracking - Every test gets a
tdd-YYYYMMDDHHMMSS-RANDOM
ID for precise tracking - ๐ Advanced Filtering - Filter tests by type, path, reference, status, and more
- ๐ Automatic Status Tracking - Monitor test results and history during TDD cycles
- ๐ฏ Professional Test Management - List, filter, and manage draft tests with detailed views
- ๐ Automated Promotion - Graduate mature tests to CI suite with preserved audit trails
- ๐ True TDD Workflow - Safe Red-Green-Refactor cycles without breaking builds
- ๐ Group-Based Organization - Pest groups for flexible test filtering and execution
- โก Five-Command Simplicity - Complete TDD workflow with just five intuitive commands
- ๐งช Zero Interference Design - Your existing Unit/Feature tests continue working unchanged
๐ฆ Installation
Install the package via Composer:
๐ก Auto-Discovery
The service provider will be automatically registered thanks to Laravel's package auto-discovery.
Publish configuration:
๐ Quick Start
1. Initialize TDDraft Environment
This sets up the isolated draft testing environment with PHPUnit/Pest configuration.
2. Create Your First Draft Test
Creates a draft test with unique reference tracking:
3. Run Draft Tests with Filtering
4. Manage Tests with Advanced Filtering
5. Promote Mature Tests to CI Suite
๐ง Five-Command TDD Workflow
Laravel TDDraft is built around a structured five-command workflow that enables professional TDD practice:
1. tdd:init
- Setup Phase
- Creates
tests/TDDraft/
directory structure - Configures PHPUnit/Pest for isolated draft testing
- Sets up status tracking system
2. tdd:make
- Red Phase (Create Failing Tests)
Options:
--type=feature|unit
- Specify test type (default: feature)--path=Auth/Api
- Custom subdirectory path--class=CustomTestName
- Custom class name
Creates draft test with unique tracking reference.
3. tdd:test
- Green Phase (Run and Iterate)
Options:
--filter="test name"
- Filter tests by name pattern--coverage
- Generate coverage report--parallel
- Run tests in parallel--stop-on-failure
- Stop on first failure
Runs draft tests with automatic status tracking.
4. tdd:list
- Review Phase (Manage Tests)
Options:
--type=feature|unit
- Filter by test type--path=directory
- Filter by directory path--details
- Show detailed view with status history
View and filter all draft tests with their current status.
5. tdd:promote
- Graduation Phase (Move to CI)
Options:
--target=Feature|Unit
- Target directory override--new-file=TestName
- Custom file name--class=ClassName
- Custom class name--keep-draft
- Keep original draft file--force
- Overwrite without confirmation
Promotes mature tests to main test suite with audit trail preservation.
๐ Filter and Group Options
Laravel TDDraft provides powerful filtering capabilities across all commands:
Command-Specific Filters
tdd:list
Command Filters
tdd:test
Command Filters
Pest Group System
Every draft test is automatically tagged with multiple groups for flexible filtering:
Group Types:
tddraft
- Identifies all TDDraft testsfeature
/unit
- Test type classificationtdd-YYYYMMDDHHMMSS-RANDOM
- Unique reference for individual test tracking
Direct Pest Filtering:
Status-Based Management
Use the status tracking system to filter by test stability:
Reference-Based Operations
Each test gets a unique reference for precise operations:
Advanced Filtering Examples
๐ Documentation
For detailed documentation, examples, and advanced usage, please visit our comprehensive wiki:
๐ Complete Documentation & Examples Wiki
Quick Links:
- ๏ฟฝ Full Documentation
- ๐ Quick Start Guide
- ๐ง Configuration
- ๐ก Advanced Examples
- ๐ฏ Best Practices
- ๐งช Test Templates
- ๐ Coverage & Reporting
๐ก Examples
Basic TDD Workflow
Advanced Usage
For comprehensive examples including:
- Real-world TDD workflows
- Advanced filtering techniques
- Team collaboration patterns
- Integration with CI/CD
- Performance optimization
๐ Visit our Examples Wiki
๐งช Testing
Laravel TDDraft follows its own philosophy - all tests are organized using the TDD workflow with complete isolation between test environments:
Test Architecture
Running Tests
Test Isolation Benefits
For Package Development:
- Production tests (
tests/Unit/
,tests/Feature/
) ensure package stability - CI pipeline only runs production tests - never broken by experimental code
- Draft tests demonstrate package capabilities without affecting main suite
For Package Users:
- Your existing
tests/Unit/
andtests/Feature/
remain unchanged - TDDraft adds
tests/TDDraft/
for safe TDD practice - No interference between production and draft test environments
Writing Tests for This Package
If you're contributing to Laravel TDDraft itself, follow the same TDD principles:
- Write failing tests first
- Implement minimal code to make them pass
- Refactor while keeping tests green
The package tests itself using the standard Laravel/Pest approach, while providing TDDraft workflow for users.
๐ง Requirements
- PHP: ^8.3
- Laravel: ^12.0
- Pest: ^3.0 (for testing framework)
Optional Dependencies
- PHPUnit: ^11.0 (alternative to Pest)
- Docker: For containerized development (optional)
๐ค Contributing
We welcome contributions! Please see our Contributing Guide for details.
๐ Security
If you discover a security vulnerability, please review our Security Policy before disclosing it.
๐ License
Laravel TDDraft is open-sourced software licensed under the MIT license.
Made with โค๏ธ for the Laravel community
Resources
Community Links
- CODE_OF_CONDUCT.md - Our code of conduct
- CONTRIBUTING.md - How to contribute
- SECURITY.md - Security policy
- RELEASES.md - Release notes and changelog
All versions of laravel-tddraft with dependencies
illuminate/support Version ^12.19
nesbot/carbon Version ^3.10
illuminate/contracts Version ^12.0