Testing a Sass Function in 5 Minutes
By: Tony Davis
In any engineering project, you can’t avoid testing your product against reality. A friend who once worked at a car design center told me that throughout each development cycle, in adding to a component-testing program with test-rigs and simulations, they would drive each newly-designed automobile down “Dunmore Lane”. This local road was infamous for its challenging terrain, reverse-camber bends and general state of disrepair. In other words, it was typical of reality. Experience told the engineers that many problems emerged only at this stage. However good the simulations, the engineers had to test the car’s mettle on the road’s decrepit tarmac, sudden bumps and deadly potholes, with a variety of loads in the car. Eventually, insurance and the local police insisted that this should cease, so the entire road was digitally mapped in meticulous detail and re-created on a test track, even with the potholes and puddles.
The result was that throughout development, the engineers measured continuously how the car responded under the worst of real world conditions, giving them far more confidence that the finished car would be up to the task. The parallels with software development are obvious and yet, when dealing with large databases, testing them out regularly on the metaphorical Dunmore Lane, while vital, is not straightforward.
During development, it’s quite expensive to set up a database in the same state as production, each time you want to run a test. This means that realistic performance testing of a database tends to happen late in the development cycle, if at all. Typically, during functional testing the database will be mocked, and any performance tests will require creating the database from the scripts in source control and BCPing in a “reasonable” amount of test data. Good, but not sufficient and there are likely to be very nasty performance surprises when the database finally hits the database equivalent of Dunmore Lane, i.e. production.
... to read more articles, visit http://sqa.fyicenter.com/art/