Advanced multi-threaded unit test framework for D with custom assertions, property-based testing, and mocking.
unit-threaded is an advanced unit test framework for the D programming language that extends D's built-in `unittest` blocks with features like named tests, custom assertions, multi-threaded execution, property-based testing, and mocking. It solves the limitations of D's default test runner by providing better organization, error reporting, and scalability for test suites.
D developers and teams building applications or libraries in D who need a robust, feature-rich testing framework to write expressive, maintainable, and parallelizable unit and integration tests.
Developers choose unit-threaded for its seamless integration with D's `unittest` blocks, fluent assertion syntax, and advanced features like property-based testing and mocking—all while maintaining compatibility with D's compile-time reflection and tooling like dub.
Advanced unit test framework for D
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides readable custom assertions like `1.should == 2`, improving test clarity and error messages as demonstrated in the README's examples.
Runs tests in threads by default for faster suite completion, with the `@Serial` attribute available for thread-safe tests when needed.
Supports UDAs such as `@Tags`, `@Setup`, and `@Shutdown` for fine-grained control over test execution and organization, reducing boilerplate.
Integrates property-based testing with the `check` function, allowing random input generation to validate function properties, though it's labeled as preliminary.
Requires manual listing of test modules or complex dub configurations, which the README admits can increase build times and have edge cases, making initial adoption tedious.
Fast compilation mode is labeled as experimental and lacks error reporting, indicating immaturity and potential instability for users needing quick builds.
Mocking support is basic compared to dedicated frameworks, requiring explicit expectation setting and verification, which might not scale for complex test scenarios.