A modern unit testing framework for Delphi 2010+ with attribute-based testing, console runner, and cross-platform support.
DUnitX is a unit testing framework for Delphi applications, designed as a modern successor to DUnit. It enables developers to write and execute automated tests for Delphi code, supporting newer language features and providing compatibility with continuous integration systems.
Delphi developers using Delphi 2010 or later who need a modern, attribute-based testing framework for unit testing their applications, particularly those integrating with CI/CD pipelines.
Developers choose DUnitX over alternatives like DUnit for its modern attribute-based testing patterns, extensive assertion library, and built-in support for CI/CD through XML logging in NUnit and JUnit formats.
Delphi Unit Test Framework
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses attributes to mark test methods, following modern patterns inspired by NUnit, which makes test code cleaner and more declarative than older DUnit styles.
Provides a comprehensive set of assertion methods for validating various conditions, as highlighted in the features, reducing the need for custom validation code.
Includes a console runner and generates XML reports in NUnit and JUnit formats, enabling easy integration with CI servers like GitLab CI and ContinuaCI without additional tools.
Works with multiple compilers including Win32, Win64, and OSX, allowing developers to run tests across different platforms from a single framework.
Planned features like data-driven tests and multi-threaded execution are not yet implemented, limiting advanced testing scenarios and requiring workarounds.
Requires manual workarounds for Delphi bugs (e.g., adding DUnitX.Init unit) and steps to replace the bundled version in RAD Studio, as noted in Tips and Tricks.
Only offers limited compatibility with DUnit tests, which may necessitate significant refactoring and code changes during migration, especially for large codebases.