PHPackages                             hardman-commerce/magento2-fixtures - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. hardman-commerce/magento2-fixtures

ActiveMagento2-module[Testing &amp; Quality](/categories/testing)

hardman-commerce/magento2-fixtures
==================================

Fixture library for Magento 2 integration tests

2.0.1(3mo ago)024MITPHPPHP ^8.1

Since Aug 9Pushed 3mo agoCompare

[ Source](https://github.com/hardman-commerce/magento2-fixtures)[ Packagist](https://packagist.org/packages/hardman-commerce/magento2-fixtures)[ RSS](/packages/hardman-commerce-magento2-fixtures/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (18)Versions (4)Used By (0)

TddWizard Fixture library
=========================

[](#tddwizard-fixture-library)

[![Latest Version on Packagist](https://camo.githubusercontent.com/26c167e32a58ffe26381db7963ef7787a800445b25e1eb23c24879f220a37b71/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f686172646d616e2d636f6d6d657263652f6d6167656e746f322d66697874757265732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hardman-commerce/magento2-fixtures)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

---

Forked from [Magento 2 Fixtures by Fabian Schmengler](https://github.com/tddwizard/magento2-fixtures).
Updated with code from [Klevu Test Fixtures](https://github.com/klevu/module-m2-test-fixtures).

What is it?
-----------

[](#what-is-it)

An alternative to the procedural script-based fixtures in Magento 2 integration tests.

It aims to be:

- extensible
- expressive
- easy to use

Installation
------------

[](#installation)

Install it into your Magento 2 project with composer:

```
composer require --dev hardman-commerce/magento2-fixtures

```

Requirements
------------

[](#requirements)

- Magento 2.4.4+
- PHP 8.1+

---

Documentation:
--------------

[](#documentation)

### [Catalog/Attribute](./src/Catalog/Attribute/README.md)

[](#catalogattribute)

Fixtures and Traits to build catalog attributes, including store scope settings.
Useful when an attribute is required to create configurable products.

### [Catalog/Category](./src/Catalog/Category/README.md)

[](#catalogcategory)

Fixtures and Traits to build categories, including store scope settings.

### [Catalog/Product](./src/Catalog/Product/README.md)

[](#catalogproduct)

Fixtures and Traits to build products, including store scope settings.
Extended TDDWizard product fixtures to add

- Tier Prices
- Images

The following product types are covered

- Simple
- Virtual
- Downloadable
- Grouped
- Configurable

Todo:

- Bundle
- Gift Card

### [Catalog/Rule](./src/Catalog/Rule/README.md)

[](#catalogrule)

Fixtures and Traits to build catalog price rules.

### [Checkout](./src/Checkout/README.md)

[](#checkout)

Fixtures and Traits to build Cart and perform a customer checkout.

Add the following product types to the cart:

- Simple
- Configurable
- Grouped

Todo:

- Bundle
- Gift Card

### [CMS](./src/Cms/README.md)

[](#cms)

Fixtures and Traits to build:

- Pages

Todo:

- Blocks
- Widgets

### [Core](./src/Core/README.md)

[](#core)

Fixtures to create config settings.

### [Customer](./src/Customer/README.md)

[](#customer)

Fixtures and Traits to build:

- Customer Addresses
- Customers
- Customer Groups

### [Sales](./src/Sales/README.md)

[](#sales)

Fixtures to build:

- Credit memos
- Invoices
- Orders
- Shipments

Todo:

- Create traits

### [Store](./src/Store/README.md)

[](#store)

Fixtures and Traits to build:

- Stores
- Store Groups
- Websites

### [Tax](./src/Tax/README.md)

[](#tax)

Fixtures and Traits to build

- Tax Classes
- Tax Rates
- Tax Rules

### Fixture pools

[](#fixture-pools)

To manage multiple fixtures, **fixture pools** have been introduced for all entities:

Usage demonstrated with the `ProductFixturePool`:

```
protected function setUp()
{
    $this->productFixtures = new ProductFixturePool;
}

protected function tearDown()
{
    $this->productFixtures->rollback();
}

public function testSomethingWithMultipleProducts()
{
    $this->productFixtures->add(ProductBuilder::aSimpleProduct()->build());
    $this->productFixtures->add(ProductBuilder::aSimpleProduct()->build(), 'foo');
    $this->productFixtures->add(ProductBuilder::aSimpleProduct()->build());

    $this->productFixtures->get();      // returns ProductFixture object for last added product
    $this->productFixtures->get('foo'); // returns ProductFixture object for product added with specific key 'foo'
    $this->productFixtures->get(0);     // returns ProductFixture object for first product added without specific key (numeric array index)
}

```

---

Credits
-------

[](#credits)

- [Fabian Schmengler](https://github.com/schmengler)
- [Richard Hardman](https://github.com/hardman-commerce/)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.txt) for more information.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance78

Regular maintenance activity

Popularity6

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 67.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~163 days

Total

2

Last Release

113d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bc6f9769de386a272da2d53a3ac8ae3ea60581ba299ec479373df6a06fa49c15?d=identicon)[hardman-commerce](/maintainers/hardman-commerce)

---

Top Contributors

[![schmengler](https://avatars.githubusercontent.com/u/367320?v=4)](https://github.com/schmengler "schmengler (181 commits)")[![richard-hardman](https://avatars.githubusercontent.com/u/101411238?v=4)](https://github.com/richard-hardman "richard-hardman (41 commits)")[![lfolco](https://avatars.githubusercontent.com/u/1709329?v=4)](https://github.com/lfolco "lfolco (14 commits)")[![hardman-commerce](https://avatars.githubusercontent.com/u/96001540?v=4)](https://github.com/hardman-commerce "hardman-commerce (12 commits)")[![mam08ixo](https://avatars.githubusercontent.com/u/1771622?v=4)](https://github.com/mam08ixo "mam08ixo (8 commits)")[![klevu](https://avatars.githubusercontent.com/u/9050822?v=4)](https://github.com/klevu "klevu (3 commits)")[![Maikel-Koek](https://avatars.githubusercontent.com/u/6301809?v=4)](https://github.com/Maikel-Koek "Maikel-Koek (2 commits)")[![avstudnitz](https://avatars.githubusercontent.com/u/662059?v=4)](https://github.com/avstudnitz "avstudnitz (2 commits)")[![tim-bezhashvyly](https://avatars.githubusercontent.com/u/462687?v=4)](https://github.com/tim-bezhashvyly "tim-bezhashvyly (1 commits)")[![jvaughan](https://avatars.githubusercontent.com/u/4849?v=4)](https://github.com/jvaughan "jvaughan (1 commits)")[![Sebastian80](https://avatars.githubusercontent.com/u/6400300?v=4)](https://github.com/Sebastian80 "Sebastian80 (1 commits)")[![amenk](https://avatars.githubusercontent.com/u/1087128?v=4)](https://github.com/amenk "amenk (1 commits)")

---

Tags

adobe-commerceautomated-testingintegration-testingmagentotest-fixtures

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/hardman-commerce-magento2-fixtures/health.svg)

```
[![Health](https://phpackages.com/badges/hardman-commerce-magento2-fixtures/health.svg)](https://phpackages.com/packages/hardman-commerce-magento2-fixtures)
```

###  Alternatives

[dotdigital/dotdigital-magento2-extension

Dotdigital for Magento 2

50374.2k18](/packages/dotdigital-dotdigital-magento2-extension)[tddwizard/magento2-fixtures

Fixture library for Magento 2 integration tests

146438.6k9](/packages/tddwizard-magento2-fixtures)[mollie/magento2

Mollie Payment Module for Magento 2

1121.6M10](/packages/mollie-magento2)[swissup/module-search-mysql-legacy

Legacy mysql search for magento 2.4

10483.0k](/packages/swissup-module-search-mysql-legacy)[pagbank/payment-magento

PagBank - Payment for Magento and Adobe

2128.3k7](/packages/pagbank-payment-magento)[buckaroo/magento2

Buckaroo Magento 2 extension

32404.0k6](/packages/buckaroo-magento2)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
