File and Folder Naming in WindowsXP


Summary

Microsoft WindowsXP allows files to be named any combination of letters and symbols up to 255 characters, provided that a few specific symbols or names are not used. When a user does attempt to use one of the reserved filenames or characters, they are typically informed that they must choose a different name. However, there are certain circumstances in which the user is not informed and the name is simply changed automatically.


Application Description

Microsoft's WindowsXP is an operating system for use on PC computers. Currently, the Microsoft operating system family comprises the most used operating systems in the world.


Test Design

This example demonstrates the use of Specification-based testing (or Spec-based testing). When Spec-based testing, the tester analyzes the program's performance based on what the specifications state.

For this presentation, we are looking at the specifications for naming files throughout the WindowsXP operating system. According to the Microsoft specifications from their website, "file names in Windows XP Professional can be up to 255 characters and can contain spaces, multiple periods, and special characters that are not allowed in MS-DOS file names." However, there are a number of restrictions on naming files and folders. According to Microsoft, a user must adhere to the following rules:

Based on this specification, we want to look through Windows and verify that these restrictions are in place and work as expected. Remember that the standard user most likely does not know these rules (and may have never even seen them). We therefore will want to keep in mind that there are certain overriding expectations that we will have for these standards, whether or not they are stated in the specifications. Those are:

  1. that attempting to name files with these names or symbols will be restricted so as not to cause errors,
  2. that when a user does attempt to use restricted names or symbols, they will be informed that they cannot do so,
  3. that when a user is informed they cannot save files or folders with certain names or symbols, it will be explained to them why they have been stopped,
  4. and that when this happens, the user is offered an alternative.

How did we come up with these expectations? No matter how vague or specific the specifications for naming files and folders are, we also have to look at the specifications for Windows. Microsoft wants Windows to be the most user-friendly and powerful operating system and we can therefore expect that we will have much ability for naming file names and should have very user-friendly explanations for errors or alerts. The specifications for any component of Windows must still adhere to the general specifications for Windows. This is a very large application, and rather than restating the same principles in every part of the specifications, they are written in the general specifications. As testers we are expected to recognize the size and complexity of an application such as this and therefore be aware that even the simplest specifications will be rooted in very complex subject matter. In other words, understand the goal of the application (by reading an overview or visiting the website) before narrowing in on a single component.

Spec-based testing can be useful for determining the proper function of a program if the tester is unaware of how the program should perform. It is also useful to verify that the program and documentation match each other, such that users will be able to read the documentation to use the program correctly. However, keep in mind that documentation is often out of date or written by people who have not worked with the program directly.


Performing the Test

  1. Start Microsoft WindowsXP.
  2. Open a Microsoft application, such as Paint:

  3. Use File->Save or Ctrl-S to save a file, and enter the filename as one of the reserved names, such as "lpt1":

  4. Click 'Save' to save the file, and we are presented with the following error:

    Excellent. This roughly satisfies our three criteria for useability. The save was restricted, the user was alerted, an explanation (though vague and cryptic) was given, and an alternative (equally as cryptic as the explanation) was offered. The user does not necessarily now why they cannot save the file with that name, or what other names are restricted, but they do know that they cannot use that name because it is reserved.

  5. Press 'OK' to exit the alert.
  6. Again, in Paint, press Ctrl-S to save another file. Name this file as "< >".
  7. Click 'Save' to save the file, and we are presented with the following error:

    This alert message is horrible. The save was restricted and the user was alerted, but a valid explanation was not offered and no alternative was given. This kind of alert message leaves the average user confused and annoyed because the user is left unaware as to what the problem is and how it can be fixed.

  8. Press 'OK' to exit the alert.
  9. Close Microsoft Paint.
  10. Let's try performing the same tasks on the Desktop. Create a new folder by right-clicking on the Desktop and selecting New->Folder:

  11. A new folder is created on the Desktop. Right-click on the folder and select Rename so that we can change its name.
  12. Change the name to "<":

    It did not even accept the input of a restricted character (excellent) and immediately informed us that we cannot name a file using the following characters. For the average user, this is both the right amount of information to offer as an explanation and suggest an alternative (as naturally the alternative is anything but what can be seen in the list of restricted characters). This sufficiently satisfies all of our expectations: the save was restricted, the user was informed, information was provided, and an alternative was offered.

  13. Now, enter "con" as the folder name and press 'Enter' on your keyboard:

    This fails almost every one of our expectations. No alert, no information, no alternative, but the name change was restricted. The common user would have absolutely no idea why the operating system is refusing to accept the name "con". In fact, it simply seems as if there is some bug with WindowsXP such that anytime a user names a folder "con", it resets to the previous name.


Results/Relevance

Our specifications did not state what types of errors messages we would see (or even that we would see any error messages at all). However, as explained earlier, there are certain overriding principles of which we must be aware. Since Microsoft aims to create the most user-friendly system, then we can expect that the user will have issues such as these explained to them in the appropriate manner.

So, what we found in our tests was that in all four cases, the saving of a file or folder with restricted characters or names was disallowed. In three out of four times, the user was alerted to the restriction. In two out of four times, the user was offered at least a minimal explanation and an alternative. In one out of four times, the user was offered a complete explanation and alternative.

Therefore, in one out of our four cases, we saw an instance where a user was sufficiently informed. In all other cases, a user would be left annoyed, frustrated, et cetera, because of the lack of consistency in the user-friendliness.

Specification-based testing is very useful for finding areas to test. By looking up a common feature like shortcut commands or help features, we see an entire list of components that we can then quickly and systematically test. In this presentation, Specification-based testing was used to evaluate a piece of software by determining through the specifications what overall goal the programmers hoped to achieve with the software.


Similar Tests/Additional Notes

Reading the documentation, even if out of date, can often provide a fundamental (and extremely valuable) understanding of what a program does. If you do not have much experience with a program that you are required to test, try reading the documentation first. You most likely will find it much easier to navigate through the program's functions and components.


Configuration Notes

Testing Microsoft's WindowsXP vSP2 on:


Created 12 August 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.