A mocking framework for Delphi XE2+ that uses RTTI to create test doubles for unit testing.
Delphi Mocks is an open-source mocking framework for Delphi XE2 and later versions. It allows developers to create mock objects, stubs, and spies for unit testing by utilizing Delphi's RTTI features, helping to isolate dependencies and verify code interactions. The framework simplifies testing Delphi applications by providing a fluent API for setting expectations and behavior.
Delphi developers using XE2 or later who practice unit testing, TDD (Test-Driven Development), or need to mock dependencies in their Object Pascal codebases.
Developers choose Delphi Mocks because it integrates seamlessly with Delphi's RTTI, reducing manual mock implementation overhead. Its rich parameter matching and intuitive API make it a practical, lightweight alternative to hand-rolled test doubles or commercial mocking tools for Delphi.
A Open Source Mocking framework for Delphi XE2 or later
Leverages Delphi's native RTTI to automatically generate mocks, eliminating manual interface implementations and reducing boilerplate code for test doubles.
Offers extensive matchers like IsAny, IsEqualTo, IsRegex, and IsInRange, enabling precise and flexible expectation setup in unit tests.
Provides an intuitive, chainable API (e.g., mock.Setup.Expect.AtLeastOnce.When.Method) that makes configuring mocks and expectations straightforward and readable.
Handles mocking for both interfaces and classes, with specific guidance to address class matching quirks, enhancing versatility in Delphi testing.
Has non-intuitive behavior with IsAny for classes, requiring IsNotNil to avoid nil conflicts, which can lead to setup errors and increased complexity.
Limited to Delphi XE2 and later, excluding legacy projects or teams on older versions, and may not keep pace with the latest Delphi releases.
As a niche framework, it lacks extensive community examples, third-party integrations, and detailed documentation beyond basic usage snippets.
Delphi Unit Test Framework
Delphi classes the wrap the MS UIAutomation library
Delphi library for running automated tests written in plain language
Deltics Delphi.libs is a comprehensive collection of libraries for the Delphi programming language, providing a diverse array of reusable functionality for Windows development. It includes the Smoketest testing framework, enabling developers to write and run tests and performance benchmarks efficiently. ## Key Features - **Smoketest Framework** — Integrated testing and performance benchmarking framework for Delphi applications. - **Reusable Components** — A collection of highly reusable classes, functions, and utilities across multiple libraries. - **Core RTL Library** — Foundational library with essential classes and functions required by other components in the collection. - **Stand-alone Libraries** — Some libraries operate independently, while others have dependencies for extended functionality. - **Compatibility** — Tested and compatible with Delphi versions from 7 through to 2010 on Microsoft Windows. ## Philosophy The project emphasizes modularity and reusability, with a focus on providing robust, tested components that simplify Delphi development for Windows platforms.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.