ZenTest: June 2008 Archives

ZenTest provides 4 different tools and 1 library: zentest, unit_diff, autotest, multiruby, and Test::Rails.

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! Use multiruby_setup to manage your installed versions.

Test::Rails helps you build industrial-strength Rails code.

Changes:

3.10.0 / 2008-06-17

mini/test is a completely minimial drop-in replacement for ruby's test/unit. This is meant to be clean and easy to use both as a regular test writer and for language implementors that need a minimal set of methods to bootstrap a working unit test suite.

mini/spec is a functionally complete spec engine.

mini/mock, by Steven Baker, is a beautifully tiny mock object framework.

Changes:

1.2.1 / 2008-06-10

  • 7 minor enhancements:

    • Added deprecations everywhere in test/unit.
    • Added test_order to TestCase. :random on mini, :sorted on test/unit (for now).
    • Big cleanup in test/unit for rails. Thanks Jeremy Kemper!
    • Minor readability cleanup.
    • Pushed setup/run/teardown down to testcase allowing specialized testcases.
    • Removed pp. Tests run 2x faster. :/
    • Renamed deprecation methods and moved to test/unit/deprecate.rb.
  • http://rubyforge.org/projects/bfts

I've been putting a LOT of effort into getting miniunit (still needs a better name... c'mon ppl!) flushed out and polished. This is the release I think is finally ready to replace test/unit in 1.9, but I need your feedback to know how it is. You can help by installing the gem and flipping it on:

% sudo gem install miniunit
% sudo use_miniunit yes

The second command will install symlinks into your sitelib directory. That comes before the stdlib dir in $LOAD_PATH so it'll take over for test/unit. You can roll it out by providing "no" as an argument instead. It should be totally easy and safe.

I've added a lot of really great stuff in this release. The biggies:

  • New useful assertions like assert_includes.
  • A refute mirrors every assert. eg refute_empty ary
  • I added mini/spec and mini/mock and they can work side-by-side with mini/test.

One of the things I did was put a lot of effort into making it work with abusive frameworks like rails (they do bad things to test frameworks). But we used the rails tests in very particular ways, so I don't know if there are other ways that don't work with miniunit.

One thing I'm proud of: Even with all the extra assertions, the spec framework, the mock framework, I still blow test/unit away. Check it:

miniunit

 lib  loc     641 total
 test loc     905 total
 totl loc    1546 total
 flog = 707.623602773533

test/unit

 lib  loc    3571 total
 test loc    2464 total
 totl loc    6035 total
 flog = 3103.27739878118

Rad eh?

So, install it and take it for a spin. Report bugs on rubyforge.

NOTE: Do not report bugs against it if you're trying to use it integrated into a GUI IDE/test-runner like komodo. It isn't meant to be compatible with GUI runners and the like. It is meant to be compatible with your tests.

ZenTest provides 4 different tools and 1 library: zentest, unit_diff, autotest, multiruby, and Test::Rails.

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!

Test::Rails helps you build industrial-strength Rails code.

Changes:

3.9.3 / 2008-06-09

  • 12 minor enhancements:

    • Added $RUBY env support to autotest so you can swap what ruby to run.
    • Added ALL_HOOKS array to autotest for hook devs.
    • Added EXCLUDED_VERSIONS to multiruby. Integrated with hoe.
    • Added miniunit compatibility to unit_diff's output.
    • Multiruby now determines the latest versions 1.8/1.9 automatically.
    • Removed deprecated :run hook.
    • Fixed zentest_assertions to be compatible with miniunit. Will phase out.
    • Minor autotest plugin cleanup / fixes.
    • Moved assertcallback to test/rails/testcase.rb
    • Reversed assert_includes' arguments.
    • Updated requirements info for other ruby impls.
    • util_capture now returns strings, not iostrings.
  • 1 bug fixes:

    • (add|remove)_(mappings|exceptions) now all return nil to help fix autotest hooks.
  • http://www.zenspider.com/ZSS/Products/ZenTest/

  • http://rubyforge.org/projects/zentest/
  • ryand-ruby@zenspider.com

About this Archive

This page is a archive of entries in the ZenTest category from June 2008.

ZenTest: March 2008 is the previous archive.

ZenTest: August 2008 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Pages

Powered by Movable Type 4.1