ZenTest 3.1.0 Released

| | Comments (5)

We've been pushing hard on ZenTest and I'm proud to announce that we just released ZenTest 3.1.0! In this release we've added multiruby and massively enhanced autotest. I have to admit, I'm falling for autotest in much the same way Eric fell for unit_diff. Unfortunately for both of us, marrying software isn't legal in Washington state.

Install Now, Read Later

sudo gem install ZenTest or visit the rubyforge project.

I'm going to write up some real stuff on using multiruby and autotest, but for now here is the standard marketing blurbies:

ZenTest provides 4 different tools: zentest, unit_diff, autotest, and multiruby.

ZenTest scans your target and unit-test code and writes your missing code based on simple naming rules, enabling XP at a much quicker pace. ZenTest only works with Ruby and Test::Unit.

unit_diff is a command-line filter to diff expected results from actual results and allow you to quickly see exactly what is wrong.

autotest is a continous testing facility meant to be used during development. As soon as you save a file, autotest will run the corresponding dependent tests.

multiruby runs anything you want on multiple versions of ruby. Great for compatibility checking!

Changes:

2 major enhancements

+ Added multiruby! YAY! + Massive improvements to autotest: speed, reliability, reporting, etc.

10 minor enhancements

+ multiruby builds in a centralized location. YAY! + multiruby now allows reinstalls quickly and easily (can even skip config). + multiruby exits with total sum of exit codes. + autotest file search is muuuuch faster. + autotest automatically detects rails mode. + autotest deals with rails dependencies much better. + autotest reruns a full suite after you go green to ensure full coverage. + autotest always runs with unit_diff -u. + autotest can now run cvs/svn/p4 up periodically to be a mini-tinderbox. + autotest now has real help.

4 bug fixes

- ZenTest is now zentest. Yay for consistency! (do a rake uninstall to clean) - ZenTest excludes pretty_print methods. - Fixed unary operator issues (they were backwards... oops!) for ZenTest. - unit_diff now runs diff.exe on Windoze. dunno if that will work.

5 Comments

Hey Zenspider, I don't know if this is unreasonable or not, but is it possible to get autotest to work with Rake somehow?

I don't how it would work, but I've got some helper methods that I load up through my rake file and change the classpath around. Err... maybe a new TestTask property or something? I dunno.

DannoHung, Eric is probably the one you want to ask about this. I can't see how to make it work, but it would be cool.

zenspider (and Eric), great job! I'm installing the gem now, and am looking forward to playing with it.

Nice. couple comments/questions about autotest...

If I have Foo < Bar , and I modify Bar.. Foo, should it not run the tests for both Foo and Bar? Currently, it doesn't seem too...

also, I have Foo::Bar , what should the test be named to be properly picked up and ran by autotest?

DannoHung: Why would you want to type "rake autotest" when you could just type "autotest"?

task :autotest do sh "autotest" end

Will add an autotest task to rake.

ennoia: autotest doesn't do any dependency analysis, just file name analysis.

If you have Foo::Bar in foo/bar.rb autotest looks for test_bar.rb.

For Rails projects autotest is a bit smarter. app/controllers/foo/bar.rb will run test/functional/foo/bar_test.rb.

Leave a comment