Monday, November 05, 2007

Tester's world of Possibilities

Probable impossibilities are to be preferred to improbable possibilities. -- Aristotle
The future belongs to those who see possibilities before they become obvious. -- John Sculley

Recently, I challenged a fellow tester about testing “Notepad ->File -> Save As” functionality. I asked him to zoom on (focus) only Text files and investigating about file names (say base file name – one without the extension) and come up with testing ideas.

He started with domain testing approach and said that file names that can be supplied to the program could be classified as:

Valid File Names – those where file creation succeeds.
Invalid File names – where file creation fails and no new file gets created.

Then he went on thinking about possible values in terms of these “classes”. I argued with him about his classification – why only think about valid and invalid file names? Can you think about other possibilities …?

Few examples that I gave are –
What if file is created but it can not be opened to view?
What if the file is created but is read only?
What if the file is created but notepad application crashes during the file creation?
What if the file is created but notepad crashes while opening such a file?
What if the file is created but it takes 10 minutes to load the file?
what if the file is created but can not be searched using Windows – Search?
And so on …
My friend said “well all of these can be considered as invalid file names” … To that I said “But as per your initial classification, no file gets created for an invalid name ….!!!!”
My friend continued “ These all are possibilities but not real values …”. I said “That is exactly is my point. As a curious tester, I think about all possibilities and then investigate on those possibilities. My work starts from that point where other wash off their hands saying “We are done”.

What do you think are the possibilities when a file is entered for Notepad -> File->Save As dialog? Keep your investigations on the lines probing the file name parameter…Can you describe the "big picture"?

Shrini

4 comments:

Anonymous said...

What do you think are the possibilities when a file is entered for Notepad -> File->Save As dialog? Keep your investigations on the lines probing the file name parameter…Can you describe the "big picture"?


Shrini, you always ask questions that are very tough and challenging for sure.

Here are my test ideas: ( It is important to note that I am taking this as an exercise to practice brainstorming test ideas and *not* for anything else )

1. A file is attempted to be saved but the disk space is full.

2. A file is attempted to be saved on a machine over the network. A file name that a local PC accepts but not a remote PC is keyed in.

3. A file that contains EICAR test virus string is attempted to save with a name that the OS considers valid with AutoProtect enabled.

4. A file that contains 500000 pages is attempted to save with a valid file name whose PC hardware is of 128 MB RAM and there are other applications running.

5. A huge file that is taking time to save with a valid file name and a script constantly looking to update the file attempts to access it the moment the file is created *and* before the file save operation completes.

6. A file is attempted to save when a shut down / reboot operation is on its way.

7. After knowing the MASPAR case, I'd want to test for all valid values for the file save operation.

8. Multiple operations of Save As is initiated and an attempt is made to overwrite on the same file by not changing the file name.

9. I'd want to look into the portion of code that has the logic/rules for validating a file name to classify whether a file name is valid or not.

10. A specific file name could lead to discovery of Easter Eggs and hence it might be important to try different file names with the names of the programmers or with foul language...

11. A file name might be valid and yet might violate some other logic of the program and hence I might want to ask if there is any other logic associated with file names that are not a part of File Save code.

12. I would love to create a heuristic in the Anti Virus software to detect a specific file name as a Virus and might want to save such a file.

13. I would be interested to save a file in the hidden partition of the hard disk.

14. I might make multiple attempts to save a file with an invalid name to see if it consistently responds the same way.

15. I might want to save a file with a name similar to a system file name but not in the root folder and then rename it to exe to see if the OS behaves any different when I do it.

16. I might want to see if a space can be given as the first character of the file or as the last character.

17. Although all the above tests might appear to pass I might want to try them on previous versions of the OS.

18. I might write a script that blocks a file save API but doesn't throw an error message and attempt to save a file. While this might look weird - a virus might just do that.

19. On running the above tests, I am sure to get some information to help me gather more test ideas.

20. 2 weeks back, I recorded a session on file/folder name creation and the issues with it on my Win XP but the video was of poor quality and hence I am going to re-record that and going to publish probably in a month or so.

While there are more ideas that I might want to share I'd like to stop here to see if any other ideas pop up from other testers.

Shrini Kulkarni said...

An Awesome effort, I would say Pradeep - A true James Bach Student.

It is preciously this kind of investigation that wanted to put up as an example.

Those who approach this from black box eq class partition technique would be locked in only two worlds "Valid" and "InValid".

Look here - you are relentlessly pocking every possible area around "File save" and each attempt (and its results) can potentially lead to equally interesting possibilities.

Testers are those creatures in the world who live on the belief that "Things can be different" - that is living in the world of possibilities ...

what other possibilities you can think of?

Shrini

Anonymous said...

Some more test ideas..
1.The given file name may not be displayed as window title
2.Chances for data loss
3.Blinking cursor may disappear after the last character of file
4.Menu items (File,Edit,Format,View and Help) may go disabled
5.Failed to close the file
6.Failed to minimize or maximize the file
7.Scroll bar at the bottom and side may disappear
8.Short cut keys fails
9.Word wrap function may fail
10.Test for each functions under all menu items

Ajay said...

Some more testcases that I can think of:
1.) If a Warning message is displayed, when tried to save the file with existing file name in the same directory.
2.) When the file is saved multiple times with the same name under different directories.
3.) Check if any validation is done when the path where the file is intended to be saved, is also mentioned in the 'Save As' name field.
4.) Try saving the file with same name (in the same folder) with different file types.