Wednesday, March 30, 2011

Hi everybody,

This is my first technical post on my blog. I was thinking what to write first, and after some time thinking, i thought that talking about Test Driven Development is a good start. Hope you enjoy it.

I don't know if you know, but i am working at the University of Buenos Aires, College of Engineering. I am supporting the students of the matter called Design Techniques in the design of the practical work that they must develop to approve the matter.
I have been there since a year and a half.

The last period of classes i have prepared a presentation to talk about Test Driven Development. I have published that presentation here.


You can find the thoerical part of TDD in the presentation. Right now, i will tell you one of my experiences working with TDD:

I have been practicing test driven development at work, with some of my colleagues: Pablo Diaz and Federico Bongiovanni are some of them. After a couple of month working with it, at the project we were assigned to work, we have realized that it has a lot of advantages that, until this time, were only book good practices.

We have been working with people from Dallas, Gary Hackathorn was one of them. Let may say thank you Gary! for all you have gave me, not only professional experience, but personal experience.

Gary proposed us to use a tool called Fitnesse to make some tests before developing the feature we have had to develop. I will talk especially about this tool in another post but at this time i only want to mention that Fitnesse is a great tool to develop tests and to fill the gap between development and qa.

If you search about Fitnesse you will find that the creators of the tool say that it was thought to create functional tests, but certainly you can create any test you want, it depends on the usage you make of the tool.

Coming back to TDD, as soon as we started working we have heard a lot of times and a lot of people say: "hey, don't you feel you are wasting time? you have been working some hours and you don't have real working code. Do you think is that useful?"

For me, those people were wrong. We have been working for a couple of hours that's true, but that we weren't doing anything useful is not true. What we have been doing is creating tests, the tests that we will use to develop our requirement. That is he first step of the TDD process. Right now we have a TODO list to star working on.

We have been working on those couple of tests the rest of that day, maybe more than one day. As soon as we finished writing the code, to make the first test pass, we continue with the next one, and so on.

When we finished, we have had not only the requirement developed but tested too!! And that is not a small thing.

Making use of Fitnesse we have created some tests and as soon as finished we passed the wiki pages of those tests to the qa people. With that in hand they were able to modify the wiki pages, to test something we didn't tested or to create new tests that means, creating new wiki pages that uses the same test code).

The result was that we have developed the requirement successfully, we have tested it and let the qa people create hundreds of tests that ensures that what we have developed was exactly what the customer was needing.

As a conclusion i want to say that TDD is an excellent practice, more than that, an excellent methodology. I say methodology because i think that TDD is not only about creating tests, it is much more than that, it involves changing our minds to start thinking in the objectives we want to reach, and work to finally reach those objectives.

Note: I have recently read an interesting article by Robert C. Martin and Robert S. Koss that shows a great example about TDD. I highly recommend you to read it.
Here it is: TDD Example

Here is a useful example with a lot of information about TDD: TDD Resources

Carlos Curotto.
Welcome!!

Hello everbody. This message is to welcome you to my Blog.

Note:

This site is written in english for many reasons:
1- The content can be appreciated by people from other countries.
2- The reader can practice the language.
3- The author can practice the language.

I hope you like it, and find it useful.

Carlos Curotto.