Recipe gallery
Ready recipes for test sets people build again and again. Download one, run it, and change it to fit your system. Each is a short YAML file with a comment on every part, and each writes into a folder of its own name, so several can run one after another.
How to use one
Download the file, then run tfg generate image-upload.yaml. The files and the manifest
land in ./image-upload. Change a limit, a size or a count in the file, and
tfg validate image-upload.yaml checks it before anything is written.
Recipes for common tests
The number of files and bytes below is what the recipe makes as it is, counted by the program when this page is built.
-
ZIP and TAR.GZ archives with real files inside: many entries, files five folders deep, folders listed as entries, an empty archive, one locked with a password and one cut short.
9 files, 26 293 248 B.
targzziptfg generate archive-upload.yaml -
Ten thousand small log files of 1 to 8 KB, for a sync folder, a backup, a file browser or a batch job that meets many files at once.
10000 files, 45 977 300 B.
logtfg generate bulk-files.yaml -
One small file of each common format, well under a megabyte in all, for a quick check in a pipeline that a system reads what it should.
11 files, 135 168 B.
csvdocxhtmljpgjsonpdfpngtxtxlsxxmlziptfg generate ci-smoke.yaml -
PDF, Word, Excel, PowerPoint, RTF and text around a 10 MB limit, a 500 page PDF, a corrupt PDF, a Word file cut short, a wrong type and an empty file.
19 files, 82 245 632 B.
docxpdfpptxrtftxtxlsxtfg generate document-upload.yaml -
EML files with attachments, an inline picture, HTML and plain text, quoted-printable, base64 and windows-1250, a thousand recipients and forwarded mail.
12 files, 17 633 280 B.
emltfg generate email-attachments.yaml -
JPEG, PNG, WebP and GIF around a 5 MB limit, one pixel and 36 megapixels, a corrupt JPEG, a PNG cut short, a PDF named as a photo and a name that climbs out of the folder.
18 files, 43 465 732 B.
gifjpgpdfpngtxtwebptfg generate image-upload.yaml -
MP4, WebM and WAV around a 10 MB limit, a portrait phone video, ten minutes of video, silence and a video cut short.
14 files, 89 640 960 B.
mp4wavwebmtfg generate media-upload.yaml -
One table as CSV with commas, semicolons and tabs, CRLF, no header and every field quoted, a wide and a large CSV, Excel sheets and two broken files.
13 files, 36 683 776 B.
csvtxtxlsxtfg generate spreadsheet-import.yaml
Every preset as a recipe
A preset is a recipe with a name. These are the recipes the presets stand for, as
tfg preset eject prints them with their default settings. They name no output folder, so
give them one with --out. Each preset has a page of its own with
what it finds and every setting it takes.
| Preset | The question it answers | Files | Bytes |
|---|---|---|---|
| empty-and-minimal.yaml Empty and minimal |
Does a file that is valid and as small as the format allows get through? | 34 | 41 762 |
| filename-handling.yaml File name handling |
Will my system store, show and give back a file name it did not expect? | 50 | 51 200 |
| picture-sizes.yaml Picture sizes |
Does my system take pictures at the sizes screens and platforms use? | 21 | 4 178 420 |
| size-boundaries.yaml Size boundaries |
Is a size limit enforced exactly where it is declared? | 7 | 73 400 320 |
| tabular-import.yaml Tabular import |
Does my table import survive what real tools export? | 13 | 3 080 060 |
| text-encoding.yaml Text encoding |
Does my reader know which encoding a file is in, or is it guessing? | 20 | 81 920 |
| upload-validation.yaml Upload validation |
Does my upload form take what it should and turn the rest away? | 75 | 120 655 872 |
tfg generate size-boundaries.yaml --out ./size-boundaries
Write your own
Every key a recipe takes is in the recipe reference, and every setting of
every format in Format settings. A recipe can also start from a
preset with extends, as the image, document and media recipes here do, and add its own
files after the set of the preset.