Imagine a product that gives you a webpage with a list of all files in a folder. The list specifies file name and age (6 months old, 1 year old...).
There's an automated test that refers the Meter to a canned folder, where file names and age are known. The test has the names and age hardcoded in the test script.
Of course, as time moves on, files age and the hardcoded expected age values are no longer correct.
I've thought about a few options:
1. Create a script that changes the metadata of the files to conform with the expected ages, so the test passes.
* The obvious problem being that if the age meter is broken and always returning the same values, the test will fail to detect that!
* Another problem is that this script will have to track hundreds of files... It will be a lot of boring work to write it!
4. Create a script that reads the actual file ages and updates that into a list of parameters that the test reads (it will no longer be hardcoded). The script would log file names and ages recursively, so no need to track the files.
* This has the problem that, with time, all files will fall into a certain age group, not testing other age groups.
* Also a problem that the test then drills in to a specific file in a specific age group, for validating the further analysis. If that file had moved, the test won't be able to get to it.
Unfortunately, the "file age meter" product does extended analysis on the files, trying to find keywords in them (also hardcoded). So, the solution doesn't seem to be: "script that creates random files in a known age group distribution and then test just aggregates the numbers"