Automated testing

2 minutes read
crafted by , on 27 February, 2015, in

Testing is that “thing” where you make sure everything works all the time.

Starting up a new product involves a lot of changes and development. And it is quite easy to break things. Customers will be indulgent for a while, but when things get serious, an “oops! we’re sorry.” will not cut it.

Automate everything, including testing

If every feature has an automated test associated, when you change or add something, all you need to do is run the test suite, sit back, and relax. The computer will do the computing.

Tools of the trade: Automated testing is done with various tools, depending on what you want to test.

Unit testing is a suite of tests written by the backend-developer, for the back-end code, that test certain parts of the system. Usually not the database or external dependencies, but instead focusing on specific functions and modules. Ideally all the modules should have unit tests backing them up.

Tools for unit testing depend on the programming language you use: it can be jUnit, phpUnit, CUnit, WinUnit and a lot of other that contain “unit” (but not only).

Integration testing is when you test the whole stack, from user data input to database persistence, and it helps identify integration problems (for example the code does what it’s supposed to, but when saving it into the database, it gets truncated or broken because of something).

Here, as you may as well use the same tools as for Unit testing, there are some specific tools to test out web apps. One of the most widely used is Selenium. Selenium is able to fire up a browser window and repeat the exact steps that a user would, while testing that everything works as expected, but much more faster. This is why it will easily spot functionality issues, directly from the user’s perspective.

Integrating all the tests

When you’ve got some unit tests in Java, some in PHP, some Selenium tests and some other types of checks, you’ll soon find it difficult to keep track of which tests passed, which failed, why and so forth.

This is where Continuous Integration Software comes in handy. Jenkins, Hudson, TeamCity, Bamboo and many others are tools that integrate everything you have from development to testing to staging and even to production into one big instrument that you can oversee and manage… almost easily.

Automated testing will greatly speed up your releases. Because when you’re done adding a new feature, you don’t need to test everything by hand, spending hours or days. Just run the test suites and if they pass, you ship it!

Regarding customer satisfaction, it only brings joy, since your product is more stable and your can truly “move fast and break things”, without breaking things in production.

How cool is that?


This article is part of a larger series about Igniting Your Startup.

About Lucian Daniliuc

Founder of Monitive.com ◆ Entrepreneur ◆ Software Developer ◆ Certified Scrum Master ◆ Zend Certified Engineer ◆ Passionate about success ◆ Turning into Batman at night ◆ More at http://daniliuc.com