Pros and cons of using Test Driven Development for web applications built with Ruby on Rails (RoR)

Folks, to those of you, who have had a tough time in getting yourself clear on the concepts of Test Driven Development (TDD) and doing Web Apps with Ruby on Rails (RoR), here is your opportunity, to get started; all you need to do is, to take a sneak peak into this simple yet easy to read annotation, on the subject.

Traditionally, Application software testing, helped fix any bugs/defects in the software, code before its release Globally, or to the clients – the goal of Test plan was to ensure that the System under test, didn’t fail on any functional or stress grounds, while in operation or otherwise.

 However, Test Driven Development or TDD as it is usually termed, is a practice of writing the testing code prior or before one develops the actual application logic.

And this reasoning can go, on and on and you can always wonder: Does the emergent design really work? What if it doesn’t work in some case? Does TDD really work? Are there any complex applications built using TDD? Are there studies that support TDD as a best practice? So on and so forth,,,

This incidentally, raises to big questions – i.e., is the TDD going to work fine for Web Apps, built using Ruby on Rails? And the second – is it really, feasible to establish the findings of the implementation team? That consists of a set of dedicated System applications and Software Engineering details of the company.






To begin with, Ruby on Rails helps quick development and frees programmers of any repetitive coding by emphasizing convention over configuration and by adopting agile/TDD development principles.

Also, Ruby on Rails development routines are short and therefore they actually help to facilitate the application of TDD methodologies, suiting well in achieving desired results. Source

TDD checks the system along these lines i) By introducing new features and checking if the system responds well ii) By checking for system responses when Ruby on Rails works closely with TDD to manage Web Apps with a lot of new features to their end-users who need  support to their ever changing business needs.

Every new feature, mentioned above can potentially inject new defects into the Software application/product code and therefore increasing the scope for malfunction in the system – which means that there is a likelihood of TDD to actually becoming exhaustive to both developers and testers as the business needs change.

However, TDD goes about creating the necessary tests for all these new features (i.e., their code) besides the numerous programs that make for the entire system – thus reducing the scope for any design upfront, almost totally!

Despite having very less scope for design upfront, it has been a well known and established fact with TDD that it actually, renders a simple and very good design, by the time the product is ready for release.

On the negative side however, it is something that is considered to be unnatural and hard to implement as we need to continuously, keep training ourselves over and over, again on how to think simpler and to ask good questions, all the time. Infact, many of us, find theTDD practices, quite challenging and time consuming, especially in understanding which/what tests to write?

Industry gurus that have heard about TDD, have tried it and have seen its benefits; State the following reasons on why they wish to continue doing TDD and why they don’t want to leave doing the same.

  • TDD makes for a controlled and realistic pace of development
  • TDD helps in avoiding difficulties to analysts and designers.
  • TDD helps build focus
  • TDD helps developers to work on small pieces of code only
  • The tests help them to save them from mistakes and other errors

Finally, there are many companies that use TDD extensively. Whilst, some of them aren’t sure fully about its core philosophy to the improvement of Development process, most however, know and support TDD and try to see how they can apply the process to arrive at an over all success.

The Ruby on Rails community is especially keen on doing TDD. Source

Hope you find the article, a good start on the subject, and if you have any Questions, doubts, queries on the same, do post them in the comments section provided below,  for a quick response from our experts! Thanks!