Testing Files Generator

Frequently asked questions

Licence, privacy, reproducibility and the things people check before putting a generator into a build pipeline. If your question is not here, the issue tracker is open.

How is this different from dd, fsutil or truncate?

Those give you a file of the right size full of nothing. A 2 MB file named photo.png made that way is not a PNG, so anything that really parses it rejects it for the wrong reason, and your test then passes for the wrong reason too. This produces a real PNG of exactly 2 MB that opens in an image viewer, and it arrives with a statement about how your system should treat it.

tfg generate --format png --size 2mb --out ./fixtures

Is it free, and can I use it at work?

Yes to both. It is released under GPL-3.0 and costs nothing. There is no account, no licence key and no paid tier.

Can I use the generated files in a closed source product?

Yes. The licence covers the code of the tool, not what the tool produces. Generated files, recipes and manifests are output rather than derived works, so you can commit them and ship them with no obligation.

Do the generated files contain real personal data?

No. Everything inside is synthesised from a seed. No dataset is read, no service is contacted and no third party content is embedded. Treat a generated e-mail address as unusable rather than unused, because any random string can collide with a real one by chance.

Will I get exactly the same files on another machine?

Yes, byte for byte, given the same recipe and the same seed. The project tests that on every change, and breaking it requires a major version bump. That is what lets you commit a small recipe instead of large binary fixtures.

Does it need an internet connection?

Never. There is no telemetry, no update check and no cloud client, and the command line binary does not have a network stack compiled into it at all. It works on a machine with no network and inside a closed corporate environment.

What happens if I ask for a size a format cannot reach?

You get an error naming the format, the smallest it can be, the reason for that floor and what to do instead, and no file is written. The tool never rounds a size silently. Every floor is listed on the formats page.

tfg formats png

Can I generate a file that is deliberately broken?

Not yet. Damaged and malformed files are a planned feature. Today every file the tool writes is a valid one of its format.

Which formats are coming next?

7z, tiff, webp, mp3 and mp4. 20 formats work end to end today.

Which systems can I run it on?

The command line runs on Windows and Linux on both Intel and ARM, and on Apple silicon Macs. The desktop window ships for Windows on Intel, Linux on Intel and Apple silicon Macs. Intel Macs are not supported and nothing is built for them.

Do I have to install anything?

No. Download the archive for your system, unpack it and run the binary. There is no installer, no runtime to add and no dependency to resolve. If you have Go, a single go install command works as well.

go install github.com/donislawdev/TestingFilesGenerator/cmd/tfg@latest

Why is a run over thousands of files slower on Windows?

Because Windows charges more for every path it looks at, and a command that goes over thousands of files looks at thousands of paths. Measured on one machine with 3000 files of 1 kB, verify takes about 0.9 seconds on Windows and about 0.2 seconds on Linux in a container. A shorter output path makes the Windows figure smaller, because every folder above the files is part of what gets looked at.

Still deciding?

The use cases page shows the jobs it is built for, and the formats page lists every format with the smallest file it can produce. The README in the repository is the full reference.

Free and open source, GPL-3.0. Nothing to sign up for. The binaries are not signed yet, so your system will warn you the first time - the release notes say what to expect.