RSS
 

Archive for the ‘StoryQ’ Category

The new StoryQ

22 Jun

I was recently interviewed for a podcast about my Behaviour Driven Development framework, StoryQ. David Starr from Pluralsight did a great job with the interview – check it out at www.pluralsight-training.net/community/blogs/pluralcast/archive/2010/06/21/pluralcast-18-bdd-in-net-with-storyq.aspx.

David also gave a great presentation on BDD at the 2010 tech ed in New Orleans, and I highly recommend it for anyone wondering how to get started, or even whether they should get started, with BDD: http://www.msteched.com/2010/NorthAmerica/DPR302

Improvements

I think this is a good opportunity to talk about some of the new features in StoryQ. My first post on StoryQ came when we’d just committed it to codeplex, and a lot has changed since then:

  • We’ve moved to Mercurial, which means our users can create public forks
  • No more ()=> operator. Thanks to FLIT, our fluent interface has evolved to accept plain old delegates, instead of Expression<Action>s.
  • Tagging. Any Step can be “tagged”, which makes it easy to find in the output report
  • By default, the HTML report generated by StoryQ is JQuery-enriched, which makes it easy to narrow down stories by class hierarchy or tag. I’m particularly proud of this report – it’s a great way to share test results with everybody, especially when published from a continuous integration server.
  • A rewritten converter gui, which lets you convert plain text stories into StoryQ code. The new version lets you choose what level of code generation you want (from Story initialisation statement to entire test class), and offers a basic form of intellisense.

Roadmap

  • The new fluent interface architecture allows us to support multiple (human) languages, and I’m looking forward to creating fluent interfaces for non-english speakers.
  • I think we’ll be able to create a new way of doing BDD in .NET that takes advantage of C# 4.0′s dynamic features
  • We still haven’t added xUnit support! Which is lame, because it’s probably going to be really easy…

Please check StoryQ out and let us know if you’ve got any bright ideas for it! And if you’ve never tried BDD, you should definitely look into it. It’s even more fun than TDD!!!

 
No Comments

Posted in Me, StoryQ

 

StoryQ: BDD / Acceptance Testing with a little help from LINQ

24 Jul

My first ever “write” operation to the Open Source community just happened! Todd (who I am working with at Datacom) was really keen to start using NBehave. He wanted to provide our clients with more visibility of what features were implemented / broken in each release. Because we were releasing every time someone checked in some code, it was pretty important to automate this.

NBehave, much like ruby’s rspec, is a great framework for making user stories executable within your IDE. Outside of your IDE, you’ve got things like Fitnesse, ZiBreve, and Twist - which are better if you want non technical people to be able to interactively define storys. On our project, however, we had technical people putting the acceptance tests into our Nunit project. Now, NBehave is written as an extension to NUnit, so i guess you could say they are compatible, but NBehave wasn’t compatible with the two NUnit runners that we were using all the time. Our developers used the superb Resharper test unit runner as they coded, and our build server (TeamCity, damn you JetBrains!) both wanted to run plain old NUnit.Framework.TestAttribute Tests.

So we set out to create a simple framework for running things that looked like story tests from within any test framework. StoryQ is what Todd & I came up with. The key points of difference from NBehave are:

  • No dependency on any particular unit testing framework (although StoryQ does like to know what kind of Inconclusive / Pending exception your framework uses)
  • StoryQ can use Lambda Expressions to make a sentence-like string out of a method call. This might not sound like much, but it actually takes away a lot of duplication pain. Thanks, LINQ!
  • When you run a brand new story test, it will be marked as pending (not failed).
  • By default, StoryQ output goes to Console.Out. You can also make it write a coloured html report to a file.
  • There is a GUI in the project that can convert from plain text into test case code.

We’ve tried to keep it all very simple and lightweight. If you feel like your current acceptance testing framework is too clunky, or if any of the benefits above sound good to you, then please grab the code and check out the samples. There’s an explanation up on the project homepage. We are very keen for feedback: issues, comments, feature requests, contributors – please don’t hold back.

 
16 Comments

Posted in StoryQ