In my course of getting continuous testing in practice I have improved my test runner by using less dependencies.
#!/bin/bash
if ! which inotifywait > /dev/null; then
echo "You must install the inotify-tools package to use this script";
exit 1;
fi
while true; do
inotifywait -r -e modify src/ tests/ --excludei "(tpl|js|css|jpg|png|yml|yaml)$" &&
clear &&
ant phpunit;
donePreviously I have implemented this by using Ruby and its Watchr gem, but now this script only relies on inotifywait binary available in major distributions.
As usual this script helps you to track your code for changes and if changed it will automatically run a bunch of actions.
Easy way to install PHP QA tools
A bash snippet that installs phpunit, phploc, phpmd, pdepend and the rest of the PHP QA toolchain in one go through Composer.
Test your code with every change in your PHP files
A continuous testing setup that runs your PHP test suite on every file save, so the TDD loop stops depending on remembering to run it.
Autotest con advertencias en Growl
Cómo enganchar Autotest de Ruby con las notificaciones de Growl en Mac OS X, editando el fichero .autotest del directorio home.