Testing Files Generator
English

Install

There are two programs. tfg is the command line, for scripts and pipelines. tfg-gui is the desktop window, for testing by hand. Both make the same files from the same settings. Pick the way of installing that fits where you will run them.

The short answer

Download the archive for your system from the releases page, unpack it and run tfg version. Everything runs on your machine, and the program never connects to the internet.

Download a binary

Take the archive for your system from the releases page, unpack it anywhere and run the program inside. Nothing else is needed. These are the systems each program is built for:

System Command line Desktop window
Windows amd64, arm64 amd64
Linux amd64, arm64 amd64
macOS arm64 arm64

The archives are named after the program, the version, the system and the processor, such as tfg_0.5.0_linux_amd64.tar.gz or tfg-gui_0.5.0_windows_amd64.zip. On Windows x64 the release also has an installer, tfg-setup_0.5.0_windows_amd64.msi.

The Windows and macOS programs are signed, so they start without a warning about an unknown developer. The Linux ones are not, because desktop Linux has nothing to sign them with.

Free and open source, GPL-3.0. Nothing to sign up for. The Windows and macOS downloads are signed and start without a warning.

Check that the archive is the one this project published

Every release has a verify-SHA256SUMS.txt with the checksum of every archive. A matching checksum says the archive arrived whole. With the GitHub command line installed, the attestation also says the release workflow of this project made it.

tfg_version=0.5.0
archive=tfg_${tfg_version}_linux_amd64.tar.gz
url=https://github.com/donislawdev/TestingFilesGenerator/releases/download/v$tfg_version
curl -fsSLO "$url/$archive"
curl -fsSLO "$url/verify-SHA256SUMS.txt"
grep " $archive\$" verify-SHA256SUMS.txt | shasum -a 256 -c
gh attestation verify "$archive" --repo donislawdev/TestingFilesGenerator --predicate-type https://spdx.dev/Document/v2.3

Without shasum, tfg tool checksum does the same on any system once you have one copy of tfg you trust: tfg tool checksum <archive> --expected <sum>.

Run it from Docker

The command line also comes as an image for Linux, on x64 and Arm. It holds the program from the release archive and nothing else, and it runs with no network. Name the version rather than latest, so the same recipe gives the same files next month too.

docker run --rm --network none -v "${PWD}:/work" ghcr.io/donislawdev/tfg:0.5.0 generate --format pdf --size 1mb

The files land in the current directory. On Linux add --user "$(id -u):$(id -g)", so the image may write there and the files belong to you. With no directory mounted, the run stops with exit code 5 rather than writing files that disappear with the container.

Install it with npm, for tests in Node

The testing-files-generator package gives Playwright, Vitest and node:test a generated set of files and what your system should do with each, and installs the tfg of the same release for your system. It comes for Windows and Linux on x64 and Arm, and for macOS on Apple silicon.

npm install --save-dev testing-files-generator
npx tfg version

How to use it in a test: Test frameworks.

Install it with pip, for tests in Python

The testing-files-generator package gives pytest and unittest a generated set of files and what your system should do with each, and installs the tfg of the same release for your system. pytest finds its plugin on its own. uv installs it as well.

pip install testing-files-generator
tfg version

If tfg is not found, the folder pip puts programs in is not on your PATH, and python -m testing_files_generator version runs the same tfg.

Install it with Go

With Go installed, this builds the command line and puts it in your Go bin folder:

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

The tag is not optional. It turns off a path of the AVIF encoder that reads past the end of a buffer on some picture sizes. Built without it, the program does not compile, and says why. The files are the same either way.

Build it from source

It needs Go and nothing else:

git clone https://github.com/donislawdev/TestingFilesGenerator
cd TestingFilesGenerator
go build -tags "$(cat .github/build-tags)" ./cmd/tfg

The window is a second program, go build -tags "$(cat .github/build-tags)" ./cmd/tfg-gui. It draws through OpenGL and reaches it through C, so it needs a C compiler on the system it is built for. Built without one, it still compiles, and says on start that it has no window and that everything is on the command line.

When the window does not open

The window needs OpenGL 2.1 to draw. On Windows the archive carries a software renderer, in an opengl folder next to tfg-gui.exe, for machines whose graphics driver offers none: a virtual machine without 3D acceleration, a remote desktop, a server. The window uses it by itself when the driver refuses, and says so on its About screen. Keep the folder next to the program.

tfg-gui --software-gl uses the software renderer on any Windows machine, which shows the window the way a machine without a driver sees it. Linux and macOS have what the window needs, so there the flag changes nothing. The command line needs no graphics at all and does everything the window does.