From time to time we sometimes need to generate dummy files for testing, we can do it with Testing Files Generator, cross-platform GUI/CLI open source tool, you can Download It From GitHub, please give it a star
Create Test Files
After launching the program, set the fields "Format", "Size", "How many files" and click "Generate", done :-)
This way you can easily create one file or how many you want, with exact size, there are 26+ formats, so chose which one you would like to get
Create Sample Files
Generation from 1) just generate size at exact size, but for testing, you will probably need to customize your files, let's say you want to generate log file.
Most of the files got "settings {formatName") section, in which you can customize the file, in this example, you can set the log content and a lot more:
^ You can also generate damaged files, just select the damage from the "damage" dropdown, you can read more about formats here
Filename Security Testing
Go to "presets" tab under there you got "preset" dropdown, which you can use for chosing boundary testing, upload-vlaidation and tons of other, in my case I will use the "filename-handling", which will generate me tons of files, which can be used to file name security testing, I had chosen the preset and clicked the "generate" button, and here is it:
PS: with each preset comes "instruction.md", you can also read more about presets here
Batch Files Generation
Go to the "Several Batches" tab, then set stat for first batch, add new bath, and set stats for the next one, you can also start the batch from the preset, in my case I want 10 .avif files and 10 .png files in range 1-10mb:
After Setting the stats I can just click "Generate" and it's done:
END
The Testing Files Generator is a lot more advanced than in this tutorial, but I tried to keep it as simple as possible, there is also "manifest" and "recipe" system, manifest is always saying how the file should behave.
There is also an "recipe" which be used for generating test files, let's say you want to have 100GB log file with "x,y,z" but storing it on GitHub is a bad idea, just store it as recipe, and you can easily generate it. You can read more about it here, oh and all the things that were done in this tutorial can be done from the CLI. I was using Windows, but you can use macOS or Linux.
*I'm author of the tool




Top comments (0)