Any simple solution for automatic test running?

Hello,

I was looking for some simple program that would run my tests every
time I update my code.

I found two that don't work.

The first is zentest which inflicts particular structure on your
project which my 2-file project does not have and which I am not
willing to inflict on it.

The other is test-loop which tries to be brutally parallel and in the
process of implementing this parallelism it eats the SIGCHLD my code
is waiting for.

My searching did not uncover anything else in this category.

Any suggestions welcome.

Thanks

Michal

Hello,

I was looking for some simple program that would run my tests every
time I update my code.

I found two that don't work.

The first is zentest which inflicts particular structure on your
project which my 2-file project does not have and which I am not
willing to inflict on it.

Try the autotest command in the ZenTest project instead.

The other is test-loop which tries to be brutally parallel and in the
process of implementing this parallelism it eats the SIGCHLD my code
is waiting for.

My searching did not uncover anything else in this category.

Since it is just a two file project, any file watcher would do it.
    https://rubygems.org/gems/directory_watcher
    GitHub - filewatcher/filewatcher: Ruby gem to perform actions when files are changed. No config files. Pure Ruby implementation and minimalistic Ruby API.

Or something based off of guard or watchr

    watchr | RubyGems.org | your community gem host
    Guard · GitHub

googling around for file system watchers or autotest provides lots of hits.

enjoy,

-jeremy

···

On Wed, Aug 10, 2011 at 04:49:40AM +0900, Michal Suchanek wrote:

--

Jeremy Hinegardner jeremy@hinegardner.org

I've had success with watchr (
http://mynyml.com/ruby/flexible-continuous-testing\) you pass it a glob
pattern and a block. When any file that matches the pattern gets modified,
it evaluates the block. So put code to run your test in the block, and the
root dir in the glob pattern.

At its simplest:
$ gem install watchr
$ watchr -e 'watch("./*.rb") { |filename| system "rake test" }'

···

On Tue, Aug 9, 2011 at 2:49 PM, Michal Suchanek <hramrach@centrum.cz> wrote:

Hello,

I was looking for some simple program that would run my tests every
time I update my code.

I found two that don't work.

The first is zentest which inflicts particular structure on your
project which my 2-file project does not have and which I am not
willing to inflict on it.

The other is test-loop which tries to be brutally parallel and in the
process of implementing this parallelism it eats the SIGCHLD my code
is waiting for.

My searching did not uncover anything else in this category.

Any suggestions welcome.

Thanks

Michal

Hello,

I was looking for some simple program that would run my tests every
time I update my code.

I found two that don't work.

The first is zentest which inflicts particular structure on your
project which my 2-file project does not have and which I am not
willing to inflict on it.

Try the autotest command in the ZenTest project instead.

That's what I did:
$ autotest --help
Continuous testing for your ruby app.

  Autotest automatically tests code that has changed. It
  assumes the code is in lib, and tests are in tests. Autotest
  uses plugins to control what happens. You configure plugins
  with require statements in the .autotest file in your
  project base directory, and a default configuration for all
  your projects in the .autotest file in your home directory.

Usage:
    autotest [options]
    -f, --fast-start Do not run full tests at start
    -c, --no-full-after-failed Do not run all tests on red->green
    -v, --verbose Be annoyingly verbose (debugs .autotest).
    -q, --quiet Be quiet.
    -r, --rc CONF Override path to config file
    -s, --style STYLE Manually specify test style.
(default: autodiscover)
    -w, --warnings Turn on ruby warnings
    -h, --help Show this.

The other is test-loop which tries to be brutally parallel and in the
process of implementing this parallelism it eats the SIGCHLD my code
is waiting for.

My searching did not uncover anything else in this category.

Since it is just a two file project, any file watcher would do it.
directory_watcher | RubyGems.org | your community gem host
GitHub - filewatcher/filewatcher: Ruby gem to perform actions when files are changed. No config files. Pure Ruby implementation and minimalistic Ruby API.

Yes, I expect that's what these have inside. Just thought I will try
to look for some semi-round wheels before doing my own starting from
the square board.

Or something based off of guard or watchr

watchr | RubyGems.org | your community gem host
Guard · GitHub

googling around for file system watchers or autotest provides lots of hits.

I sure do get lots of results for autotest but can't see something
that does *not* go back to zentest.

Thanks

Michal

···

On 9 August 2011 22:00, Jeremy Hinegardner <jeremy@hinegardner.org> wrote:

On Wed, Aug 10, 2011 at 04:49:40AM +0900, Michal Suchanek wrote:

Yes, watchr is quite nice.

The only minor problem is that with multiple overlapping patterns only
the first one is used.

Thanks

Michal

···

On 9 August 2011 22:02, Josh Cheek <josh.cheek@gmail.com> wrote:

On Tue, Aug 9, 2011 at 2:49 PM, Michal Suchanek <hramrach@centrum.cz> wrote:

I've had success with watchr (
http://mynyml.com/ruby/flexible-continuous-testing\) you pass it a glob
pattern and a block. When any file that matches the pattern gets modified,
it evaluates the block. So put code to run your test in the block, and the
root dir in the glob pattern.

At its simplest:
$ gem install watchr
$ watchr -e 'watch("./*.rb") { |filename| system "rake test" }'