The Testing Framework You Wish You Had Earlier.
Say goodbye to printf debugging. Say hello to clean, automated, crash-proof testing for your C projects.
42 Ultimate Tester is a fast, lightweight, dependency-free testing framework built for real C developers.
- No setup, no dependencies, no main function required
- Automatic test discovery
- Clean, readable logs with file + line info
- Isolated execution in forked processes (no more global crashes)
- Type-aware assertions (check return values and/or outputs)
- Function-to-function comparison
- Automatic
stdout/stderrredirections - One-liner output capturing
- Custom labels
- Detect unfreed allocations with precise file/line reporting
- Detect bad malloc protection, null deref, unsafe access, SIGSEGV/SIGBUS, etc.
- Pure POSIX C
- Works on Linux and macOS (
x86andARM) - Zero external dependencies
- No-
sudoinstall option - Perfect for
libft,ft_printf,gnl,minitalk, and all 42 projects
✌️ Just write what you want to test, and let the framework handle all the complicated stuff.
From anywhere, just run:
curl -fsSL https://raw.githubusercontent.com/guillaumeast/42_ultimate_tester/master/1_scripts/install.sh | shor:
wget -qO- https://raw.githubusercontent.com/guillaumeast/42_ultimate_tester/master/1_scripts/install.sh | shThis will:
- Clone the repo to
~/.42_ultimate_tester/ - Build the
libfut.astatic library - Link the library and header to your system (global or local)
You can now run your first test in just a few seconds by following this guide ⚡️
✌️ No setup, no dependencies, no editing, no excuses.
You can update by running the following command:
~/.42_ultimate_tester/1_scripts/update.shYou can uninstall the framework by running the following command:
~/.42_ultimate_tester/1_scripts/uninstall.shTo make your life easier, you can set up aliases in your shell config.
For example, if you use zsh shell, run the following commands:
echo "alias fut_update='~/.42_ultimate_tester/1_scripts/update.sh'" >> ~/.zshrc
echo "alias fut_uninstall='~/.42_ultimate_tester/1_scripts/uninstall.sh'" >> ~/.zshrc
source ~/.zshrcNow you can simply:
- Update with
fut_update - Uninstall with
fut_uninstall(but you won't, right?)
Your first steps. Write a test, compile it, and run it in less than a minute.
Learn more about Test Sets and global timeouts.
Test(): create isolated executable test blocks.
Master stdout and stderr redirections.
redirect_start(),redirect_read(),redirect_stop(): manually redirect outputs and read them back.get_output(): Easily capture outputs in a single line.
Understand how to verify correctness, compare behaviors and detect crashes/freezes with safe and flexible assertion tools.
assert(),assert_eq(),assert_neq(): verify your code logic with type-aware comparisons.compare(): compare behaviors of two functions.*_label(): use custom labels instead of default ones.
Catch memory leaks and unsafe memory accesses directly from your tests.
memleaks(): detect unfreed allocations.memsafety(): detect null dereferences, unsafe malloc usage, and crash-prone memory operations.
- Nested Timeouts: Using
assert*()/compare*()/mem*()timeouts inside aTest()which also have a timeout enabled may introduce race conditions. (WIP) - Struct Comparison:
assert_eq*()andassert_neq*()do not support struct comparison yet. (WIP) - Nested redirections: Using
print_stdout()orprint_stderr()inside nested redirections is not supported yet. (WIP) - Logs length: Test set titles and failed assertions logs are limited to 256 characters max. (WIP)
Knowing the limitations is part of mastering the tool.
Contributions are welcome!
Whether you want to fix a bug, improve the documentation, add features, or optimize the core, feel free to open a Pull Request.
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature
- Commit your changes:
git commit -m "feat: add my feature" - Push your branch and open a Pull Request
💡 Make sure your contribution follows the project's structure and conventions.
If you're unsure about something, feel free to open an issue — discussion is welcome.

