March 15, 2013 by Roman Ožana

Test Driven Development and Testomato

Image via Dave’s Blog

Testing can be a pain. It’s also one of the first things we skip when deadlines are looming or when the temptation to cut a few corners gets the better of us. Unfortunately, not testing has its consequences and this could mean many a late night chugging coffee and cursing yourself.

We’re all about making testing easier and more effective, which is why our post today will give you a brief overview of test-driven development.

Test-driven development (TDD) is a software development process, which employs very short development cycles that are repeated over time.

TDD employs a technique in which the testing code and the source code are written simultaneously. Basically, this ensures that you’ll be testing (and re-testing) your code throughout the development cycle.

The basics of TDD

  1. A developer writes an automated test code that outlines an improvement or new function they wish to add to their application.
  2. This test code should fail when tested.
  3. A minimum amount of code is written to fulfill the requirements of the original automated test code, so that it passes the test.
  4. This code is rewritten (refactored) to an acceptable standard.
  5. Start over with a new feature or program.

This is what the test-driven development cycle looks like:

Image via Wikipedia

Why is this useful?

TDD allows programmers to make changes or modifications quickly and efficiently. This method allows programmers to ensure that their code will pass automated tests. It also helps pinpoint changes that have introduced bugs into the code, making it easier to fix problems later on.

How can Testomato help with TDD?

While Testomato can’t write the original TDD tests for you (that’s all up to your own personal inner genius), we can still help you find problems during the process.

More specifically, we can help you deal with continuous integration. This means Testomato will be most helpful and effective at the the end of your development cycles (since you’ll be repeating them often).

If you set up hooks within your code to call our API, we can help you check your pushed sources before and after deployment.

Additionally, including a push code, which launches your old tests, each time you create a new version of your application or program will help you keep your process error and bug free.

Our API is accessible within our online service or you can use Testomato’s free command line tool, Apimato, which is available on Github.

Here’s a short link round-up for more information about TDD:

TDD Terminology Simplified

The Newbie’s Guide to Test-Driven Development

Test-Driven Development (Wikipedia)

Introduction to Test Driven Development

OMG, Test Driven Development Actually Works

Would you use TDD?

Tell us why or why not. Leave a comment below or find us on Facebook. You can also tweet us @testomatocom.

Happy testing!

Is your website available? Testomato can check your website availability every 15 seconds from 10 different locations around the world and will send you an alert if the site is unavailable.

Keep track of the important parts of your website with simple checks that can run every minute. They can check plain words, HTML code, HTTP headers, redirects … and much more. Never miss anything.

Websites break, it happens all time. You'll be the first to know. Testomato has an extensive database of and will let you know if it finds any error on monitored url.