Better Software - March 2009 - (Page 55) The Last Word Reloadable Test Data-O-Matic by Tanya Dumaresq Act now to take 50 percent off test execution time, virtually eliminate “works on my machine” arguments, and we’ll throw in load testing absolutely free! Ladies and gentlemen, right now, you’re probably wondering if I’m crazy. “How can she make this incredible offer?” Well, I’m here to tell you that with pre-created reloadable test data, it’s easy. “What is this magical ‘reloadable test data?’” you ask. Reloadable test data is test data that you reuse every time you test. Right now, many testers—and yes, even developers—tend to create test data on the fly each time they run a test. Test Case ID 1 is an example test case based on an application that manages nurse/patient records in a health care system. This requires a tester to create the following data (which would take at least ten minutes): • Agency administrator • Patient • Two branches • Two branch administrators with email addresses • Nurses from patient’s old branch • Multiple patient appointments with above nurses • Various vital statistics for the patient Chances are, this test would be run at least four times: a first pass, two regression or sanity tests, and one bug retest. Ten minutes times four test runs equals FORTY minutes. But WAIT! With reloadable test data, creating that same data will take only TWENTY minutes. “How is that possible?” you ask. By taking an extra ten minutes up front to set up and create this data in a reloadable format, you can reuse the test data four times—or even more. Where does this extra time savings come from? I’m glad you asked … Take 50 Percent Off Test Execution Time You, too, can create and use reloadable test data in five easy steps! Step 1: As you write your test cases, simply keep a spreadsheet that records the entities you will need for each case and what special characteristics each entity must have. IMPORTANT! To maintain data freshness, do this as you write each test case—or else you will have to spend extra time trying to remember the needed data and you will end up with dry, cracked entities. Table 1 shows part of a spreadsheet we’ve created for our application that maintains nurse/patient records for a clinic. But what does the “Is Changed” column mean? Can I just ignore it? NO! That column is VERY IMPORTANT. Sometimes, in the course of running a test, the data for an entity is changed BY THE TEST. Perhaps Administrator 1 is deleted or Patient 3 is transferred to the care of Nurse 5. In a case where this happens, you will not be able to share this test data between different test cases. Step 2: When all of your test cases are complete, it’s time to create the actual data in a format that is loadable for Test Case ID 1: Transfer of a patient to a new branch within an agency Table 1 www.StickyMinds.com MARCH 2009 BETTER SOFTWARE 55 http://www.StickyMinds.com
For optimal viewing of this digital publication, please enable JavaScript and then refresh the page. If you would like to try to load the digital publication without using Flash Player detection, please click here.