Test Driven Development and Testomato
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
- A developer writes an automated test code that outlines an improvement or new function they wish to add to their application.
- This test code should fail when tested.
- A minimum amount of code is written to fulfill the requirements of the original automated test code, so that it passes the test.
- This code is rewritten (refactored) to an acceptable standard.
- Start over with a new feature or program.
This is what the test-driven development cycle looks like:
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:
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.