Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. D
  3. unit-threaded

unit-threaded

BSD-3-ClauseD

Advanced multi-threaded unit test framework for D with custom assertions, property-based testing, and mocking.

GitHubGitHub
124 stars39 forks0 contributors

What is unit-threaded?

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.

Target Audience

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.

Value Proposition

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.

Overview

Advanced unit test framework for D

Use Cases

Best For

  • Writing expressive unit tests with custom assertion syntax in D
  • Running test suites in parallel to reduce execution time
  • Property-based testing with generated inputs for D functions
  • Mocking interfaces and structs in D unit tests
  • Organizing tests with tags, setup/shutdown hooks, and serial execution
  • Integration testing with isolated file system operations using sandbox environments

Not Ideal For

  • Projects with strict build time constraints where additional dependencies and compile-time reflection overhead are unacceptable
  • Teams relying on D's default unittest runner who want zero-configuration testing without manual module management
  • Environments requiring extensive, production-ready mocking capabilities beyond the basic interface and struct support provided

Pros & Cons

Pros

Fluent Assertion Syntax

Provides readable custom assertions like `1.should == 2`, improving test clarity and error messages as demonstrated in the README's examples.

Parallel Test Execution

Runs tests in threads by default for faster suite completion, with the `@Serial` attribute available for thread-safe tests when needed.

Advanced Test Attributes

Supports UDAs such as `@Tags`, `@Setup`, and `@Shutdown` for fine-grained control over test execution and organization, reducing boilerplate.

Property-Based Testing

Integrates property-based testing with the `check` function, allowing random input generation to validate function properties, though it's labeled as preliminary.

Cons

Cumbersome Setup Process

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.

Experimental Fast Mode

Fast compilation mode is labeled as experimental and lacks error reporting, indicating immaturity and potential instability for users needing quick builds.

Limited Mocking Ecosystem

Mocking support is basic compared to dedicated frameworks, requiring explicit expectation setting and verification, which might not scale for complex test scenarios.

Frequently Asked Questions

Quick Stats

Stars124
Forks39
Contributors0
Open Issues3
Last commit1 month ago
CreatedSince 2013

Tags

#d-language#property-testing#unit-testing#integration-testing#dlang#mocking#testing#mock#dub-package#property-based-testing#multi-threaded#test-framework#unittest#dlanguage#assertion-library

Built With

D
D

Included in

D748
Auto-fetched 1 day ago

Related Projects

fluent-assertsfluent-asserts

Fluent assertion framework for D with expressive syntax and detailed error messages

Stars48
Forks8
Last commit3 days ago
sillysilly

Better test runner for the D programming language. No nonsense

Stars0
Forks0
Last commit
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub