Better Software - September 2008 - (Page 21) Test Connection so that I can focus on the text. To assist with these tasks, better text editors include support for regular expressions— powerful forms of notation for seeking, matching, extracting, or replacing patterns in text. See Jeff Friedl’s Mastering Regular Expressions [3]. Learning. The Perl, Python, and Ruby scripting languages provide powerful support for regular expressions, but it can be hard to appreciate their value until you’ve learned to use them well enough to perform your first miracle. More complex regular expressions can be hard to learn without visual feedback and recoverability. Using the text editor to step through pattern matching and substitution, seeing changes in the text in real time, and being able to press the Undo key helped to accelerate my learning. Data inspection. When I need to learn something about a file—its content or format—I often start investigating by opening it in a text editor. I might see a header that gives me clues, data in clear text, or repeated patterns of strings or blanks. I often scroll through a log file very quickly, using a defocused perspective to identify patterns of output or dramatic differences from the norm. (We call this “blink testing” or using a “blink oracle.” See the StickyNotes for more information.) I can also use the editor to delete or change characters as a quick way to modify a clean data file to see how a program handles file corruption. My colleagues and I sometimes use our editors for things that their publishers might not have expected. When I try to pour a lot of data into an input field, and the input field truncates the excess, I copy the field and paste it into the editor to get a word or character count right away. I often use text files as a backup mechanism when I’m entering text into a Web page. Jon Bach says that he uses text files as longer-term, safer storage for the clipboard. We both use text editors to peel the formatting off rich text when we’re pasting large volumes of text to disjointed cells in an Excel file. James Bach once programmed his text editor to remind him to take testing notes every few minutes. When I forget the syntax for a tag or a special character in HTML, or the character associated with a particular ASCII code, my text editor is the handiest and fastest reference. There are several points to all this. First, the simpler the tool, the more flexible, adaptable, and useful it might be. Think of the difference between a $50 Swiss Army knife and a $15,000 computer-controlled table saw. Second, like “quality,” “purpose” is not something inherent in a product. Purpose is a relationship [4] between the product and the person who is putting it to some use. Third, some of those purposes are intended by the designers and adopted by the users, but novel and surprising purposes may emerge as we use a product— or as we test it. As testers, we’re usually asked to defend the value of a product by finding important problems with respect to its intended purpose. However, if we think of our products as tools that different people will use in different ways, we may add value by discovering purposes that haven’t yet been recognized. For example, if we think of a test tool as “any tool that supports testing,” even the humble text editor might become a powerful test tool. {end} rEfErEncEs: 1] McLuhan, Marshall. Understanding Media. The MIT Press,1994. 2] www.satisfice.com/tools/perlclip.zip 3] Friedl, Jeffrey. Mastering Regular Expressions. O’Reilly Media, Inc., 2006. 4] Weinberg, Gerald M. Introduction to General Systems Thinking. Dorset House Publishing Company, Inc., 2001. What tools do you use that you or others might not have recognized as a test tool? Follow the link on the StickyMinds.com homepage to join the conversation. Sticky Notes For more on the following topics go to www.StickyMinds.com/bettersoftware. n n TextPad Blink testing www.StickyMinds.com SEPTEMBER 2008 BETTER SOFTWARE 21 http://www.blackbaud.com/qacareers http://www.satisfice.com/tools/perlclip.zip http://StickyMinds.com http://www.StickyMinds.com/bettersoftware http://www.blackbaud.com/qacareers 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.