Built-in testing integral to Ruby on Rails' appeal
Our rewrite of Total Blue System in Ruby on Rails proceeded for many reasons, but among the most important was the built-in testing framework that comes with it. Perhaps e-commerce isn't the most exacting science in the world, but for our clients, there's very, very little margin for error. When your e-commerce site is a 24 x 7 x 365 cash register accounting for up to 2/3's or more of your revenue, well, it matters to get the details right.
Ruby on Rails gives us the opportunity for automated or scripted testing in ways that PHP just didn't deliver, at least with the ease and elegance we're achieving today in Ruby. There are a couple kinds of test, and each can be important in their own way:
- Unit tests, which examine the integrity of data models. At last count, we'd developed 149 tests with 398 assertions.
- Functional tests, which ensure the proper functioning of what you might think of as a web page. At last count, we'd developed 344 such tests, with 1,717 assertions. wow.
- Integration tests, which analyze a sequence of pages for calculation and display continuity and accuracy. So far in our rewrite, we've completed one such integration test, with 50 assertions of accuracy.
This integration of software-driven testing delivers these benefits to our clients:
- When a new feature rolls out, as it does frequently as part of our continually updated software product, you don't have to wince, waiting for something to break or a new bug to be discovered. Sure, it still happens once in a while. But it's a more rare occurence all the time, and we're all glad the trend is going in the right direction.
- When certain peak sales periods roll around, merchants can become very sensitive to any disruption to their e-commerce site. With tests in place verifying the accuracy of the software, we can roll out bug fixes or even new features during critical times with confidence.
- Our software development team can spend more time introducing features, improving performance, or correcting bugs (fixing it the first time), because we're spending less time manually testing our code, or less time putting out fires that bad code introduced. It's a smoother, more confident process for all.
As a final note, there's much that's been said about the speed that Ruby on Rails affords in software development. Compared to PHP and other choices, we'd have to agree. However, we find the extra time we save ends up being reinvested in writing tests for the code. So the net time is the sime, but the code that is completed exhibits a solidity that our clients can count on.

Recent Comments