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. The next step is to use the Nunit or MsTest framework, which allows you to check your code on the cruise control server after each build, and you can receive a report with the results of your last merge or check-in on the source code repository. Sometimes very clever developers say that when they write a 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? My answer is that you cannot be better because writing 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. What are special frameworks for writing clean asserts for our tests? For example, you can say that some test abstracts said: “It should grant me access to database connection when I use a Connect method.” Spec# can allow you to have in C# code that asserts with full test abstract specified inside the code. I do not have any examples for you today, but that is a 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 thing 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. Required fields are marked *


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