So you’ve probably heard of ZenTest/Autotest, right?
In case you haven’t, it is a Ruby gem that (among other things) automatically runs your tests whenever it notices that a file in you project has changed. It’s a great productivity boost, because it saves you from having to run your tests each time you make a change to your program. The perfect tool if you are doing TDD.
So I wanted to get this autotest functionality going for projects in other languages - like PHP, for example - but apparently ZenTest/Autotest only works within Ruby projects.
Talking to the EnvyLabs’ guys I was told about Watchr, a Ruby gem that monitors files matched by a regular expression and triggers a user defined command whenever a file changes. That’s enough to get you started in an autotest-like tool for PHP - or just about any other language.
I’ve setup an example PHP project of Watchr playing an autotest role in a PHP project:
The source code from this example can be seen at http://github.com/caike/watchr_running_php


Fala, Caike! Bem legal essa ferramenta, pode ser útil até no Coding Dojo (até como inspiração para a DojoTools, que está começando a caminhar).
P.S.: Que música é essa de fundo? Parece um pouco Deftones…
Fala, Alex!
A idéia é usá-la em Coding Dojos mesmo.
Um projeto de maior porte provavelmente precise de algumas funcionalidades a mais, como rodar apenas o método de teste que falhou e etc.
Eu vi que o Flávio implementou uns métodos pra monitorar arquivos no DojoTools.
Será que não há algo parecido com o Watchr em Python ?
A música é Knife Party do Deftones
> Será que não há algo parecido com o Watchr em Python ?
Cheguei a procurar algo parecido pra Python, mas não encontrei. De qualquer forma, é uma “simples” questão de traduzir o que está em Ruby para Python!
> A música é Knife Party do Deftones
Sabia que soava muito familiar!