Find and Replace Scope Bug in ThunderBird

 


Summary

In Mozilla Thunderbird, if a user asks the program to find and replace all instances of a word, the program does this correctly. However, if the user only highlights a small area and asks the program to find and replace all instances of a word, the program will change some words outside of the selection as well as all of the words inside of the selection.


Application Description

Mozilla's ThunderBird is a highly customizable e-mail client available for Linux, MacOS, and Windows. At the time of writing this presentation, ThunderBird was still pre-1.0 (meaning that it was still a preview release for testing purposes).


Test Design

This example demonstrates the use of Scenario testing. In scenario testing, we create a hypothetical situation the program could be run through, and then we run through it ourselves based on that situation. This helps us to evaluate the program's real-world adaptibility, as well as help us to test many functions that are not frequently used or tested (or simply aren't tested thoroughly enough).

To test ThunderBird, let's pretend we are e-mailing a very long memo out to the staff of the company we own. The memo sums up some of the decisions made at the previous board meeting. However, after typing the memo into an e-mail message, we notice that in one section we have called someone by the wrong name. Through the rest of the e-mail, however, all the names appear correctly and we do not need to change those ones. Rather than search through the entire very long memo, we instead highlight the area with the wrong name and use the Find and Replace function to switch the wrong name with the right name.

Though we may have individually tested the Find and Replace function, typing and sending an e-mail message, the New Message function, and the selection feature , by creating this story we will actually test all of these functions in tandum. We can now evaluate both how well they work on their own and how well they work together.


Performing the Test

  1. Open Mozilla Thunderbird.
  2. Compose a new message by clicking on the 'Write' button:

  3. Now type a very, very, very long message (perhaps just cut and paste some very large text file into the message). To make it easier to see the whole page, the picture below uses a fairly short memo:

  4. Highlight the first numbered section (Bob Hoskins' suggestions). We have just realized that we accidentally made it sound as if Bob Hoskins has made suggestions for himself to do in third person, but actually all of those "Bob Hoskins" should say "Bob Rogers".

  5. Now press Ctrl-F or use the top horizontal menu to click on Edit->Find and Replace.
  6. In the 'Find text:' box, type "Hoskins", and in the 'Replace with:' box, type "Rogers":

  7. Now click 'Replace All' to have all the "Hoskins" in the selected area become "Rogers".

Results/Relevance

Looking in the picture below, we can see that not only were all the "Hoskins" in the selection replaced, but also all of the "Hoskins" on the bottom of the page. Oddly enough, the "Hoskins" at the top of the page were unchanged:

Again, the picture above demonstrates a very short e-mail. What if the e-mail were 10 pages long? We would now have to sort through all of the text trying to figure out which names were supposed to be which, because we wouldn't be sure which ones had changed. Also, what if we didn't even notice that they were changed?

Scenario testing is an excellent way to perform in-depth tests with many of a program's features all at once and, such as in this presentation, evaluate how well they work together.


Similar Tests/Additional Notes

More information about the bug in this presentation can be found on Mozilla's Bugzilla page.

Scope is a very important component of most programs. If a user highlights an area to work with, and the application makes changes outside of the range of the selection, it can cause many problems (especially if the user does not notice or expect the changes outside of the selection area). Test some other applications in which scope is important, such as word processors, and observe how well the applications handle it.


Configuration Notes

Testing Mozilla's ThunderBird v0.7 on:


Created 24 June 2004 for the CSTER

All images and written material ©Copyright Sam Oswald 2004

This work is licensed under the Creative Commons Attribution-ShareAlike License.
To view a copy of this license, visit
http://creativecommons.org/licenses/by-sa/2.0/
or send a letter to
Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305,
USA.