Documentation
How to install tfg, make your first test files, and everything the program takes and writes: every command and flag, every key of a recipe, every field of the manifest and every setting of every format. The reference pages are read from the program when the site is built, so they say what the version you download does.
Start here, then look things up
-
Download the command line tool and the desktop window, check that the archive is the one this project published, or run it from Docker, npm, pip or Go.
-
Make one file of an exact size, then ten thousand, check them against the manifest, remove them, and turn the run into a recipe you can commit.
-
Every command of the tfg command line with every flag it takes, its default and what it does, read from the program's own help, and every exit code.
-
How to write a recipe: every key it accepts, the ways to give a size, name templates, expected outcomes and reasons, damage, archive contents and presets.
-
Ready recipes for common test sets: image and document uploads, table imports, archives, email, media, CI and bulk files. Download one, run it, change it.
-
Every field of the manifest written beside the files: the run, the summary, and each file with its hash, its settings and how your system should react to it.
-
Every setting each format takes, such as pages, picture size, delimiter or encoding, with the values it accepts, its default and what it changes in the file.
-
Use generated test files inside your tests: the pytest plugin and the npm package for Playwright, Vitest and node:test, with what each file should be met with.
-
The window of Testing Files Generator screen by screen: one batch, presets, several batches, tools and preferences, with what each of them does.
-
Offline tools for files you already have: see whether an archive is safe to unpack, zip slip and zip bomb included, and check or write SHA-256 checksums.
What the tool does, by topic
-
Every file format this generator produces, the smallest file each one can be, and the settings each one accepts. All 32 open in the software that owns them.
-
Ready-made sets of test files, each answering one testing question: upload limits, file names, encodings, table imports, empty files and upload validation.
-
Make a file that is broken on purpose, at the exact size you ask for, with a manifest saying your system should reject it. For testing upload validation and parsers.
-
Download sample files for testing: one of every format at 1 MB, corrupt PDF, Word and Excel files, CSV tables and placeholder images, each with its SHA-256.
-
Test cases for a file upload: the size limit, empty and corrupt files, the wrong type, unexpected file names and archives, each with the file that tests it.
-
Generate test files in the pipeline instead of committing binaries: a GitHub Actions workflow, a GitLab job, exit codes that fail the build and the PowerShell catch.
-
fsutil, dd, truncate and mkfile, each measured on the system it belongs to - and why a file made that way is not a PDF or a PNG when a test needs one.
Still stuck?
tfg <command> --help says what a command takes, in the terminal. Every refusal names
the setting it is about, why, and a value that would work. If something does not behave the way a page
here says, open an issue. That is a bug in the page or in the program.