We've Only Got One Life to Live, So We Shouldn't Waste It on Ineffective Test
Total Page:16
File Type:pdf, Size:1020Kb
Testing & Analysis We’ve only got One Life to Live, so we shouldn’t waste it on ineffective test design. Follow this Guiding Light to The Bold and the Beautiful world of Soap Opera Testing BY HANS BUWALDA 30 BETTER SOFTWARE FEBRUARY 2004 www.stickyminds.com TEST PROCESSES ARE SUCCESSFUL IF THEY are effective, efficient, manageable, and fun. A major factor in how well these four objectives are achieved is the ap- proach to making test cases. One such approach is “soap opera” testing. As many readers know, soap operas are dramatic daytime television shows that were originally sponsored by soap vendors. They depict life in a way that viewers can relate to, but the situations portrayed are typically condensed and exaggerated. In one episode, more things happen to the characters than most of us will experience in a lifetime. Opinions may differ about whether soap operas are fun to watch, but it must be great fun to write them. Soap opera testing is similar to a soap opera in that tests are based on real life, exaggerated, and condensed. Info to Go I Tests should be fun and aggressive. I Add structure to retain, and even improve, manageability. I Write scenarios that are reality- based, exaggerated, and condensed. BY LISA HENDERLING ILLUSTRATIONS www.stickyminds.com FEBRUARY 2004 BETTER SOFTWARE 31 Testing & Analysis The idea for turning test cases into to five people each) and come up with call the “mechanical approaches.” soap operas came to me while testing a stories based on the most extreme exam- By a mechanical approach, I mean de- new financial system. A group of end ples that had happened, or that could veloping tests following a simple, pre- users was mobilized to come up with a happen in practice. Imagination was in- structured process. For example, consid- large number of test cases quickly. It was vited and exaggeration was welcome. To er the following process. Start with a important that the test cases be very help the process, I asked the groups to finite number of screens or requirements. good and very aggressive, even though imagine that they were writing soap op- For each screen (or requirement) in a sys- time was limited due to extra pressure eras. This helped create lean, mean test tem, make a test case that inputs values from the potential Y2K problem. Be- cases fast. It also made the whole experi- in that screen. After entering the values cause the system had to do sensitive ence a bit more fun, which was important for each screen, verify that those values work such as calculating pensions for re- in this situation, where end users had to appear in the system. Then, check tirees, errors were a big no-no. put in a lot of time testing—something whether the system has caught illegal in- The end users were the people with not in their job descriptions. put, such as mandatory fields that the most practical knowledge, but they haven’t been filled in. If the above tests had no IT or QA background. The testers Mechanical Approaches are completed successfully, testing is lacked the proper financial background to Testing complete. and the day-to-day experience. To solve To set the stage for soap opera testing, I These tests may be developed “top this, the testers and end users were asked want to contrast it with the more common down”—break down functional specifica- to sit together in small work groups (four ways test cases are usually made, which I tions and/or requirements until the items are elementary enough to create tests for them. Or they may be developed “bottom up”—make one or more tests for each small unit in a system, Count the Goodies then organize those tests into larger suites. These are analyti- BY HANS BUWALDA cal ways of thinking, common Our soap, called “Count the Goodies,” is about the Goody family. for IT people. For testing, however, a bet- ter direction is what I like to call “outside In this episode, the Goodys have won $750,000 in the lottery. They decide to buy that big in”—work from the business environment house on the corner of the street that they’ve always dreamed about. Father, Bing Goody, toward the system under test. This is the goes to the banking office to make the necessary arrangements. Of course, the bankruptcy essence of soap opera testing. that Bing had two years ago complicates the approval, but Jim, the guy at the bank, is very I’m not saying that mechanical ap- helpful and even sells Bing on the idea of a beautiful vacation property in Mexico. Bing has a proaches aren’t any good. On the con- brilliant idea. Why not ask neighbor Jones if he is interested in co-owning the vacation prop- trary, mechanical approaches tend to be erty? Like everything else with Mr. Jones, his credit is perfect. straightforward and give reasonable con- One week later: After a small party with some new friends, only about $720,000 of fidence that the functionalities in the the prize money is left, so the mortgage arrangements need to be changed. Jim, system under test are in good Mr. Jones, and Bing decide to meet the next morning to make the necessary adjustments. Since it was a great party, they are not at their best when they meet, so many mistakes are made. They correct some immediately, others they miss and will need to fix later. They find that an additional second mortgage on Mr. Jones’s home is needed in order to still qualify for the vacation home. A story like this can potentially test all kinds of objectives, such as I Entering a customer with a big family I Mortgage arrangements including a first and a second house I Property abroad I Both a primary residence and a vacation property I Weighing of the income of a second owner I Co-ownership on the second house only I Establishing a second mortgage to finance a vacation property I Bankruptcy two years ago I Modification of the down payment I Correcting errors upon entry I Corrections after the application has been processed 32 BETTER SOFTWARE FEBRUARY 2004 www.stickyminds.com Testing & Analysis enough shape for normal, everyday us- tiveness. However, in exploratory test- age. For many systems, such knowledge ing, test design and text execution inter- relieves a lot of concerns; if anything mingle. The soap opera testing tech- does go wrong after release, it can proba- nique, on the other hand, has separate bly be fixed with manageable impact. test design and test execution phases. Also, since mechanical test cases tend Tests are described and reviewed by to correspond to tangible things like stakeholders first, before they are (po- screens or requirements, their de- tentially much later) executed, prefer- velopment and execution are easy ably by automation. to manage. It is possible to predict how many test cases have to be de- Imagine, Weed, and Feed veloped and executed at any point in Soap opera testing gives you all of the the project. But this also leads to a confidence of mechanical testing but disadvantage of mechanical test adds the complexity necessary for highly cases: Since the individual tests are ambitious testing. It also allows you to usually small, they come in great maintain separation between test design numbers, which can be and test execution. Your testing can be hard to organize and automated but not bogged down in a Disorder Depot track, particularly when large number of tests to organize and there are multiple ver- track. Finally, it allows you to have fun BY LISA CRISPIN sions of a system under and be creative, key to getting your test- There are 20 preorders for Elite Force Avi- test, such as foreign languages. For exam- ing mind flowing. ator George W. Bush Action Figure in En- ple, when a system needs to undergo To create effective soap opera tests, terprise awaiting the receipt of the items adaptations, it will be hard to know first write the situations without worry- in the warehouse. Finally, the great day which tests are impacted. Getting the test ing too much about the technical details arrives, and Jane at the warehouse re- cases up-to-date again can become a pro- of the system under test. Try to immerse ceives 100 of the action figures as avail- hibitive task. yourself into the business the system was able inventory against the purchase or- The biggest concern I have with me- designed for and take it from there. der. She updates the item record in chanical testing, however, is the typical- Don’t try to invent completely new sto- Enterprise to show it is no longer a pre- ly low “ambition level.” By that I mean ries every time. Instead, do the same order. Some time passes, during which the degree of aggressiveness designed thing “real” soap operas do: Invent a the Enterprise background workflow to into a test to find hidden problems. fixed set of characters that experience release preorders runs. The 20 orders are Most tests I see in organizations are not (are subjected to) various events. This pick-released and sent down to the ware- overly ambitious; if all requirements are way the test cases become like “epi- house. Meanwhile, Joe loses control of met and every screen works, the tester sodes,” which are easier to come up his forklift and accidentally drives it into and the QA manager are happy. That with. For instance, in the case of a finan- the shelf containing the Bush action fig- might be fine at a certain point in the cial system, the cast could be a family ures.