Suppose, during testing, you wish to test how the software handles a "corrupt" file.
I have two questions:
1. In general, how do you define a "corrupt" file? In other words, what constitutes a corrupt file?
As an example:
Suppose you need to test a "corrupt" .pdf file.
One suggestion is to simply take a .zip file, change the extension, and test with that. However, I would argue that you are not testing how the program handles a "corrupt .pdf file," but rather, how it handles a .zip file.
Another suggestion is to open the file and insert/delete random bytes. This suggestion is okay, but there are a few problems:
2. Once a corrupt file is defined, how do you go about creating one?
Here is what I have been thinking so far:
A "corrupt file" is a file that correctly meets the specifications of the file format, but which contains data/bytes that are inherently flawed.
The only example I could think of was if you changed the encoding of the file somehow. You could then possibly apply this method to files of arbitrary format.
Thanks for reading.
Sometimes, even though your files get corrupted, unreadable, or damaged, you can delete them by clicking the "Delete" button, holding the "Shift+Delete" buttons, or even dragging them to the recycle bin.
Corrupted files are computer files that suddenly become inoperable or unusable. There are several reasons why a file may become corrupted. In some cases, it is possible to recover and fix the corrupted file, while at other times it may be necessary to delete the file and replace it with an earlier saved version.
Another suggestion is to open the file and insert/delete random bytes.
This is what I do generally. Whilst I understand the issues that you bullet above, I deem a file to be corrupt if it is unreadable by its native application.
Eg., an xls won't open in Excel, a docx won't open in Word, etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With