Thursday, November 29, 2007

Gallio / MbUnit v3 Alpha 1 Release

Today we decided to cut an early preview release of the Gallio Automation Platform and MbUnit v3.

Download the combined installer from here.

Alpha 1 marks a significant milestone: much of the groundwork is in place.  It doesn't look like much yet, but there's a whole lot going on inside.  We can run MbUnit v2, MbUnit v3, NUnit v2 and xUnit.Net beta 2 tests in a variety of ways, generate reports, write plugins, and produce installer packages with integrated documentation.  We can also do nifty things like embed attachments, such as WatiN screenshots, into reports.

However, this release is primarily of interest to fellow toolsmiths.  We do not recommend using it in a production environment at this time.  This is a work in progress.  Some parts are already quite polished but there are still many loose ends.  Many planned features are absent.  We appreciate your interest and support in our efforts!

Alpha 2 will consolidate what we've accomplished with Alpha 1 to deliver a genuinely useful product.  We plan to incorporate more work from NBehave, NUnit and other teams we are bringing on board.  In addition, we'll pick up the pace on the development of the end-user tools (particularly the GUI) and of the framework components.  This is also when MbUnit v3 will begin to blossom.

And we'll take it from there...

If you are interested in learning more about the Gallio Automation Platform and MbUnit v3, please join us on the Gallio-Dev or MbUnit-Dev mailing lists.

P.S.: I'll try to get some screenshots and a walkthrough up soon.

Tuesday, November 27, 2007

Close but not quite...

I was pondering different mechanisms for adapting some existing reflection-based code to transparently perform reflection against a variety of targets: types loaded in the current AppDomain, types whose metadata has been read from disk, and types that are purely defined by an in-memory AST.  (The reason is to support running MbUnit tests inside of ReSharper.)

The xUnit.Net guys encountered this same problem.  They chose the obvious solution of defining a few new interfaces such as ITypeInfo and to write wrappers that accept .Net Type instances or ReSharper ITypeElement instances.

Sure that's a fine approach.  Can we do better?

It turns out that the .Net class library partly supports a retargetable reflection model via subclassing.  You can actually subclass Type, MemberInfo, and other types and override most of their implementation.  The Reflection.Emit library uses this feature extensively.

There's just one hitch: you can't subclass Assembly or ModuleReflection.Emit does this but you and I can't because the constructors are internal and much of the behavior is non-virtual.

Oh duck typing, where are you?


Wednesday, November 7, 2007

Beautiful Code

I've been reading Beautiful Code on and off during my commute and in the bathtub.

I had high hopes for this book.  I'm somewhat disappointed.  I found some several chapters quite good, others a bit mundane, a few were somewhat tedious to read, and a couple espoused what I consider to be risky design practices.

Nevertheless, I did enjoy the diversity of the examples and opinions.  It's always good to read what other coders have to say, even when we disagree.

There's much more to be said about beautiful code.  I haven't dug into the Beautiful Code web site much yet but at a glance it looks pretty good.  And there's always lots of stuff to read in other books, blogs, and mailing lists.

My first piece of advice to other programmers is always: "Read more code."  So if you're thinking about reading this book, I'd say go ahead.  It can't hurt.  ;-)