FREE Subscription to Dr. Dobb’s Digest: Same Great Content, New Digital Edition
Site Archive (Complete)
Testing & Debugging Blog: You Are Not Done Yet: File Operations
Testing and Debugging
BREAKPOINTS

Test, Debug, Release, Rinse, Repeat ...

by Kevin Carlson
THE BOOK OF TESTING

Thoughts From a Braidy Tester

by Michael Hunter
February 05, 2007

You Are Not Done Yet: File Operations

You are not done testing unless...you have thoroughly tested your application's Open, Save, and Save As functionality. I don't know about you, but I get grumpy when my work disappears into thin air! For many applications, if data cannot be saved and later regurgitated with full fidelity, the application may as well not exist. Thus it is important to verify the correct thing happens under the following conditions:

  • Open each supported file type and version and Save As each supported file type and version. Especially important is to open from and save as the previous version of your native format. Customers tend to get grumpy if upgrading to a new version means they can no longer open old documents! And they tend to not upgrade if they do not have a simple way to share documents created in the new version of your application with those poor souls still languishing on the old version.
  • Open each supported file type and version and Save. If the file type and version can be selected during a Save operation (as opposed to a Save As operation), Save to each supported file type and version. More usually, Save saves to the current version only.
  • Roundtrip from each supported version to the current version and back to the previous version. Open the resulting file in that version of your application. Does it open correctly? Are new features correctly converted to something the previous version understands?
  • Open files saved in the current version of your application in previous versions of your application. If the document opens, how are features added in the new version handled? If the document does not open, is the resulting error message clear and understandable?
  • Open from and Save and Save As to different file systems (e.g., FAT and NTFS) and protocols (e.g., local disk, UNC network share, http://). The operating system generally hides any differences between types of file systems; your application probably has different code paths for different protocols however.
  • Open, Save, and Save As via the following mechanisms (as appropriate):
    • Menu item
    • Toolbar item
    • Hot key (e.g., Control+S for Save)
    • Most Recently Used list
    • Microsoft SharePoint document library
    • Context menu(s)
    • Drag-and-drop from the file system explorer
    • Drag-and-drop from your desktop
    • Drag-and-drop from another application
    • Command line
    • Double-click a shortcut on your desktop
    • Double-click a shortcut in an email or other document
  • Open from and Save and Save As to the following locations:
    • Writable files
    • Read-only files
    • Files to which you do not have access (e.g., files whose security is set such that you cannot access them)
    • Writable folders
    • Read-only folders
    • Folders to which you do not have access
    • Floppy drive
    • Hard drive
    • Removable drive
    • USB drive
    • CD-ROM
    • CD-RW
    • DVD-ROM
    • DVD-RW
  • Open from and Save and Save As to various types and speeds of network connections. Dial-up and even broadband has different characteristics than that blazing fast one hundred gigabyte network your office provides!
  • Open files created on (and Save and Save As to as appropriate):
    • A different operating system
    • An OS using a different system locale
    • An OS using a different user locale
    • A different language version of your application
  • Open from and Save and Save and Save As to filenames containing
  • Cause the following to occur during Open, Save, and Save As operations:
    • Drop all network connections
    • Fail over to a different network connection
    • Reboot the application
    • Reboot the machine
    • Sleep the machine
    • Hibernate the machine
  • Put AutoSave through its paces. What happens when you AutoSave every zero minutes? Every minute? With a very big document? If the AutoSave timer is per document, what happens when multiple AutoSaves kick off simultaneously, or while another AutoSave is in progress? Does file recovery from AutoSave work as you expect? What happens if the application crashes during an AutoSave? During recovery of an AutoSaved document?
  • Save and Save as in the following conditions:
    • No documents are dirty
    • One document is dirty
    • Multiple documents are dirty and the user chooses to save all of them
    • Multiple documents are dirty and the user chooses to save none of them
    • Multiple documents are dirty and the user chooses to save only some of them

Posted by The Braidy Tester at 09:30 AM  Permalink




 
INFO-LINK