The Undo Function in Paint Does not Perform as Specified

 


Summary

In this example we are going to do Specification Based Testing by picking a piece of MS Paint's specifications (the user manual) and making sure that the application conforms to it. We are going to focus on the specification of the Undo function. The specifications claim that the application can undo up to 3 changes, but that is not always true. If the user is editing graphics, there are cases when it can undo only 2 changes. If the user is editing text in a text box, it can undo only 1 change (the last letter).


Application Description

MS Paint is a drawing tool that can be used to create simple or elaborate drawings. These drawings can be either black-and-white or color, and can be saved as bitmap or other types of picture files. The user can print these drawings, use them for their desktop background, or paste them into another document. (Source: www.microsoft.com).

In this example we will use the Undo function and the following two functions:

The line tool can be used to draw a straight line. The user has to click on the toolbox, and then drag the mouse in the drawing area.

The text tool can be used to add text to a drawing. The user has to click on Text in the toolbox. Then he/she has to drag the pointer diagonally in the drawing area to create a text frame.

      


Test Design

This example demonstrates the use of Specification Based Testing. To perform Specification Based Testing we have to go through the specifications of MS Paint (the help library in our case) and verify that the application is behaving as specified. The specification's description of Undo is:

To undo changes

On the Edit menu, click Undo.

Note

You can undo up to three changes.

MS Paint claims that its Undo is able to undo up to 3 actions, so our goal is to find a case where the claim is not true. We can test this in two different situations: graphics editing, and text editing. We will first create a line, make changes to it, and then restore it using the Undo function. Then we will repeat the same actions for text in a text box.

We would expect that after making three changes and then undoing them, the information on the screen will be in its original state (before the changes were made).


Performing the Test

  1. Create a new document. Click anywhere on the page and create a text box. Then type some text.


  2. After you click "Undo" once, the application removes the last typed letter (‘d’ in this case).
    Therefore, the user will expect that pressing "Undo" second time will undo the next letter (‘c’ in this case).
    Notice that ‘repeat’ is grayed out, when it shouldn’t be.

  3. Press "Undo" again

Results/Relevance

The result is that pressing "Undo" second time negates the first undo (this is the job of ‘repeat’).
We found a case where the user can use Undo only once.

Undo is usually used to revert to previous state after something has gone wrong. If there are cases when this does not work, the user might have to start over their work. MS Paint probably wouldn't be used very often for adding and editing text, but the problem exists when editing graphics also (see Similar Tests).


Similar Tests

Let's do a simple test. Draw a line.

After we make three changes to it and then use Undo three times, we would expect to get back the line in its original state.

Drag off three of its segments.

Press "Undo" three times. It turns out that only two of the actions were undone.

 

Additional Notes

It appears that using the selection box to select something doesn't count as an undo action, because after deselecting it undo will not bring back the selection.

The phrase “up to 3 actions” can be interpreted two ways. One way is that user decides how many actions to undo up to three (that is how I interpreted it). Another way is that the application decides how many actions to undo, but no more than three (0, 1, 2, 3). This vagueness can be considered an error in the specifications.


Configuration

Testing Microsoft's MS Paint v5.1 on:


Created 20 May 2004 for the CSTER

All images and written material ©Copyright Georgi Nikolov 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.