Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I run Perl test suite automatically when files change?

Tags:

testing

perl

Is there a tool that would watch file changes in a directory tree of a Perl application and re-run the test suite every time I save changes to some module? Something akin to masak’s tote.

like image 486
zoul Avatar asked Dec 03 '22 14:12

zoul


2 Answers

Have a look at Test::Continuous

Some Test::Continuous links:

  • Video presentation with slides from YAPC::Asia 2008
  • Run continuous tests on remote host
  • Github repo
like image 158
draegtun Avatar answered Dec 29 '22 00:12

draegtun


The old school unix solution would be to write up a Makefile and trigger it regularly through a cron job (as frequently as once a minute), and have it mail you the results if something broke.

Alternatively if you use a revision control system such as svn, you could use a commit hook to kick off a build/test cycle when you commit a file.

One other thing you could do is write a wrapper script around your editor (such that when you close or save a file, the build/test cycle is triggered).

like image 38
Ether Avatar answered Dec 28 '22 23:12

Ether