The TDD Dashboard is a versatile application designed as a Laravel PHP package, specifically tailored to facilitate Test-Driven Development (TDD) workflows. It serves as a comprehensive tool for developers to manage and monitor their tests while actively coding. It comprises of several features and functionality such as
-
Test Framework Compatibility The TDD Dashboard is engineered to be test framework agnostic. Accommodating a wide range of test frameworks that operate in a terminal environment. This flexibility allows developers to seamlessly integrate their preferred testing tools into their workflow.
-
Out-Of-The-Box-Testers The dashboard comes preconfigured with several popular testing frameworks, including PHPUnit, phpspec, behat, Jest, and AVA. This preconfiguration simplifies the setup process for commonly used testing environments.
-
Custom Test Integration Developers can easily incorporate their own testing tools by providing the path to the executable. This means that regardless of your project's specific testing requirements, you can configure the dashboard to support them effortlessly.
-
Progress Monitoring The TDD Dashboard offers a visual representation of test progress, making it easy to track the status of your tests. This visual feedback enables developers to identify failing tests quickly and monitor overall test suite execution.
-
Screenshot Display If your chosen test framework generates screenshots during testing, the TDD Dashboard has the capability to display these images within the log page. This visual representation retains the familiar red and green indicators that developers are accustomed to seeing in their terminal output.
In conclusion, the TDD Dashboard is a feature-rich application that enables developers to quickly adopt a strong TDD methodology. It supports a wide range of test frameworks, assures smooth code editor integration, and offers crystal-clear visual feedback on test progress. Additionally, its adaptability to the particular requirements of your project is made possible by its flexibility in integrating custom test tools, thus boosting your capacity to develop trustworthy and maintainable code while adhering to the TDD technique.
- PHPUnit
- Laravel & Laravel Dusk
- Codeception
- phpspec
- Behat
- atoum
- Jest
- AVA
- React
- Ruby on Rails
- Nette Tester
- Symfony
- Project List: click a project link to see all its tests.
- Open files directly in your source code editor (PHPStorm, Sublime Text...).
- Error log with source code linked, go strait to the error line in your source code.
- Enable/disable a test. Once disabled if the watcher catches a change in resources, that test will not fire.
- Real time test state: "idle", "running", "queued", "ok" and "failed".
- "Show" button, to display the error log of failed tests.
- Highly configurable, watch anything and test everything!
The Artisan commands Watcher and Tester are responsible for watching resources and firing tests, respectively:
Keep track of your files and enqueue your tests every time a project or test file is changed. If a project file changes, it will enqueue all your tests, if a test file changes, it will enqueue only that particular test. This is how you run it:
php artisan tddd:watch
Responsible for taking tests from the run queue, execute it and log the results. Tester will only execute enabled tests. This is how you run it:
php artisan tddd:test
It uses JoliNotif, so if it's not working on macOS, you can try installing terminal-notifier:
brew install terminal-notifier
This package was tested and is known to be compatible with
- Laravel 4.1+ or 5
- PHP 5.3.7+
Install php version first php version 7.1.0 : https://prototype.php.net/versions/7.1.0/ Install Composer next composer 2.6.2 : https://www.javatpoint.com/how-to-install-composer-on-windows#:~:text=Updating%20and%20Uninstalling%20Composer&text=From%20there%2C%20you%20can%20verify,ready%20for%20the%20next%20steps. Install Laravel next laravel V4.2 : https://laravel.com/docs/4.2
laravel new tddd
cd tddd
composer require pragmarx/tddd
php artisan vendor:publish --provider="PragmaRX\Tddd\Package\ServiceProvider"
valet link tddd
# configure database on your .env
php artisan migrate
php artisan tddd:watch & php artisan tddd:work &
open http://tddd.dev/tests-watcher/dashboard
For lots of examples, check this starter app, which will also help you create an independent dashboard for your tests.
Require it with Composer:
composer require pragmarx/tddd
Create a database, configure on your Laravel app and migrate it
php artisan migrate
Publish Ci configuration:
On Laravel 4.*
Add the service provider to your app/config/app.php:
'PragmaRX\Tddd\Package\ServiceProvider',
php artisan config:publish pragmarx/tddd
On Laravel 5.*
php artisan vendor:publish --provider="PragmaRX\Tddd\Package\ServiceProvider"
'project bar (dusk)' => [
'path' => $basePath,
'watch_folders' => [
'app',
'tests/Browser'
],
'exclude' => [
'tests/Browser/console/',
'tests/Browser/screenshots/',
],
'depends' => [],
'tests_path' => 'tests',
'suites' => [
'browser' => [
'tester' => 'dusk',
'tests_path' => 'Browser',
'command_options' => '',
'file_mask' => '*Test.php',
'retries' => 0,
],
],
],
You have first to remember they are being executed in isolation, and, also, the environment is not exactly the same, so things like a cache and session may affect your results.
Laravel Ci is licensed under the BSD 3-Clause License - see the LICENSE
file for details
Pull requests and issues are welcome.