Become more Agile with Behavior Driven Development and Spec#

imageHello, everyone want to be more Agile in some cases, sometimes teams use Scrum sometimes event Kanban wallboard. Today I would like to tell you story about Test Driven Development (TDD) and its enhancement that is Behavior Driven Development (BDD). Of course all about Agile and Software production is about test automation. I know a few software engineers that know the power of TDD and I do not know why only a few. My experience with TDD gives me opportunity to think that TDD is something you need to grow for.

Not everyone know how to start and for them I have one advice, when you write some component write a small console application to check, performance, to test memory usage or something, this console application is a kind of TDD for beginners. If you write reusable components and for develop you are using console application to test you are already TDD and you are more Agile already. Next step is to use Nunit or MsTest framework that gives you opportunity to check your code on the cruise control server after each build and you can receive a report with results of your last merge or check-in on source code repository. Sometimes very cleaver developers said that when they wrote piece of software without a unit test they need to take a shower because that is a dirty job example :). Ok, so you may wonder how to be more Agile than become TDD master? Mine answer is that you cannot be better because write a better tests and better code is something you as a software engineer need to always learn more and more.

But you can write tests taster and better with BDD for example in C# you can use Spec# on Codeplex, for Ruby is RubySpec and so on. That are special frameworks for write clean asserts for our tests for example you can say that some test abstract said: “It should grant me access to database connection when I use a Connect method”. Spec# can gives you opportunity to have in C# code that assert with full test abstract specified inside the code. I have not any examples for you today but that is very clever idea to write an assert like those on a spec and have results with your spec and at the end Pass or Fail keyword.

So, if you want to be more Agile you can start using console applications for reusable components, after that test framework to automate your job, after that you can use BDD framework to clean spec asserts in your code, and after that only one think you need to is become master of unit tests. And believe me you are never good enough in that area :).

Best regards,

P ;), a TDD Jitsu and an BDD Jitsu Adept :).

Leave a Reply

Your email address will not be published.


This site uses Akismet to reduce spam. Learn how your comment data is processed.