Comments on: Faster TDD with Stakeout.rb http://mikenaberezny.com/2007/09/04/faster-tdd-with-stakeout-rb/ Wed, 10 Feb 2010 01:29:42 +0000 http://wordpress.org/?v=2.9.2 hourly 1 By: PHP Auto Test – Automatically monitor your project for changes and run your unit tests « Web Application Development, E-commerce, Sales & Marketing http://mikenaberezny.com/2007/09/04/faster-tdd-with-stakeout-rb/comment-page-1/#comment-152450 PHP Auto Test – Automatically monitor your project for changes and run your unit tests « Web Application Development, E-commerce, Sales & Marketing Wed, 18 Nov 2009 21:27:37 +0000 http://mikenaberezny.com/archives/78#comment-152450 [...] read about stakeout.rb but read that it might not work on windows. Rather then waste time even trying I just ported it to [...] [...] read about stakeout.rb but read that it might not work on windows. Rather then waste time even trying I just ported it to [...]

]]>
By: Josh Ribakoff http://mikenaberezny.com/2007/09/04/faster-tdd-with-stakeout-rb/comment-page-1/#comment-152448 Josh Ribakoff Wed, 18 Nov 2009 20:53:27 +0000 http://mikenaberezny.com/archives/78#comment-152448 I ported it to PHP, and started breaking up the code into objects and sub-routines. http://pastebin.org/54979 - override runTests() with the command you want to run - override doDelay() to check more/less often - pass the path to files in the contstructor Invoke like this: C:/wamp/bin/php/php5.3.0/php E:\dev\path\phpautotest.php E:\dev\path\to\monitor I ported it to PHP, and started breaking up the code into objects and sub-routines. http://pastebin.org/54979

- override runTests() with the command you want to run
- override doDelay() to check more/less often
- pass the path to files in the contstructor

Invoke like this:
C:/wamp/bin/php/php5.3.0/php E:\dev\path\phpautotest.php E:\dev\path\to\monitor

]]>
By: Joaquin Lippincott http://mikenaberezny.com/2007/09/04/faster-tdd-with-stakeout-rb/comment-page-1/#comment-150605 Joaquin Lippincott Thu, 24 Sep 2009 18:09:09 +0000 http://mikenaberezny.com/archives/78#comment-150605 Here's a post on using stakeout.rb with Drupal: http://www.metaltoad.com/blog/fun-stakeoutrb Here’s a post on using stakeout.rb with Drupal:

http://www.metaltoad.com/blog/fun-stakeoutrb

]]>
By: René Leonhardt http://mikenaberezny.com/2007/09/04/faster-tdd-with-stakeout-rb/comment-page-1/#comment-80604 René Leonhardt Fri, 01 Feb 2008 08:11:04 +0000 http://mikenaberezny.com/archives/78#comment-80604 <pre lang="python"> #!/usr/bin/env python # -*- coding: iso-8859-15 -*- import os, subprocess, sys, time if len(sys.argv) < 3: print "Usage: stakeout.py [files to watch]+" sys.exit(1) command = sys.argv[1] files = {} for arg in sys.argv[2:]: if os.path.isfile(arg): files[arg] = os.path.getmtime(arg) last_changed = max(files.values()) try: while True: time.sleep(1) for file in files.iterkeys(): file_mtime = os.path.getmtime(file) if file_mtime > last_changed: files[file] = last_changed = file_mtime print "=> %s changed, running %s" % (file, command) try: retcode = subprocess.call(command, shell=True) print "=> done" except OSError, e: print >>sys.stderr, "Execution failed:", e except KeyboardInterrupt: pass </pre>
#!/usr/bin/env python
# -*- coding: iso-8859-15 -*-
 
import os, subprocess, sys, time
 
if len(sys.argv) &lt; 3:
  print "Usage: stakeout.py  [files to watch]+"
  sys.exit(1)
 
command = sys.argv[1]
files = {}
 
for arg in sys.argv[2:]:
  if os.path.isfile(arg):
    files[arg] = os.path.getmtime(arg)
last_changed = max(files.values())
 
try:
  while True:
 
    time.sleep(1)
 
    for file in files.iterkeys():
      file_mtime = os.path.getmtime(file)
      if file_mtime > last_changed:
        files[file] = last_changed = file_mtime
 
        print "=> %s changed, running %s" % (file, command)
        try:
          retcode = subprocess.call(command, shell=True)
          print "=> done"
        except OSError, e:
          print >>sys.stderr, "Execution failed:", e
except KeyboardInterrupt:
    pass
]]>
By: Mike Naberezny http://mikenaberezny.com/2007/09/04/faster-tdd-with-stakeout-rb/comment-page-1/#comment-44663 Mike Naberezny Wed, 05 Sep 2007 13:22:32 +0000 http://mikenaberezny.com/archives/78#comment-44663 :-) I'd like to see everyone do more testing, regardless of whatever language they happen to be stuck using. :-)

I’d like to see everyone do more testing, regardless of whatever language they happen to be stuck using.

]]>
By: Ryan Davis http://mikenaberezny.com/2007/09/04/faster-tdd-with-stakeout-rb/comment-page-1/#comment-44618 Ryan Davis Wed, 05 Sep 2007 08:58:29 +0000 http://mikenaberezny.com/archives/78#comment-44618 now that's just sad... Geoffrey didn't have THAT in mind! now that’s just sad… Geoffrey didn’t have THAT in mind!

]]>