The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
ZenTest 3.9.0: now with more Evil

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Ryan Davis

Posts: 651
Nickname: zenspider
Registered: Oct, 2004

Ryan Davis is a ruby nerd.
ZenTest 3.9.0: now with more Evil Posted: Jan 31, 2008 12:12 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Ryan Davis.
Original Post: ZenTest 3.9.0: now with more Evil
Feed Title: Polishing Ruby
Feed URL: http://blog.zenspider.com/index.rdf
Feed Description: Musings on Ruby and the Ruby Community...
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Ryan Davis
Latest Posts From Polishing Ruby

Advertisement

Something I should have emphasized more in my release notes:

  • Added ability to set test execution order, defaults to :random. EVIL!

What does this mean?

It means that if you ignored my post titled "rake passes but autotest fails?", then autotest is gonna get its revenge when you update. No. Really. It is gonna f' your tests up real good. Why? Because it is Good Testing Practice™ for all your tests to be completely standalone. If I could run your individual tests randomly I'd do that as well(*).

I've had a number of filed bugs and hallway conversations where someone states "blah blah ... but when I run it under autotest, it fails" and somehow they've convinced themselves that it is autotest's fault. "HAH!", I say! Not bloody likely. If your tests aren't written in such a way that each and every individual test can be run in isolation or in any combination and order, then you didn't write tests, you wrote bugs. I really can't emphasize that enough so autotest plans to help you exorcize yourself of these bugs.

Really, you should just take the hit right now and deal with it. But what if your PHB is breathing down your neck? You can tell autotest to run your tests in "Ye Olde Fashioned Sorted Mode" with the following (be sure to copy and paste and fill it out:

Autotest.add_hook :initialize do |at|
  at.order = :alpha  #  I am a bad person. [your name], [today's date]
end

and then make yourself a promise that in 1 month's time autotest will be able to run your tests in any order. Now write it down, and sign it, in blood.

*) I did mention that I wrote miniunit, right? *smile*
**) They probably aren't. PHB's usually won't let you use autotest in the first place. Or write tests for that matter. So if you've gotten this far, you're probably in good shape.

Read: ZenTest 3.9.0: now with more Evil

Topic: hoe version 1.5.0 has been released! Previous Topic   Next Topic Topic: Tribe Management

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use