PHPackages                             yireo/magento2-test-generator - 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. yireo/magento2-test-generator

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

yireo/magento2-test-generator
=============================

N/A

0.0.5(6mo ago)62031OSL-3.0PHPCI failing

Since Aug 15Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/yireo/Yireo_TestGenerator)[ Packagist](https://packagist.org/packages/yireo/magento2-test-generator)[ RSS](/packages/yireo-magento2-test-generator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (5)Versions (5)Used By (0)

Yireo TestGenerator for Magento 2
=================================

[](#yireo-testgenerator-for-magento-2)

**Use this module to kickstart unit tests or integration tests for your existing module.**

### Installation

[](#installation)

```
composer require yireo/magento2-test-generator
bin/magento module:enable Yireo_TestGenerator
```

### Usage

[](#usage)

Generate integration tests for the module `Yireo_Example` if they don't exist yet:

```
bin/magento yireo:test:generate Yireo_Example
```

Or generate integration tests, overriding existing tests as well (DANGEROUS) unless there is a token `@test-generator-skip-override` found in the test file contents:

```
bin/magento yireo:test:generate Yireo_Example --override-existing=1
```

Or generate unit tests:

```
bin/magento yireo:test:generate Yireo_Example --type=unit
```

Generate unit tests, overriding the original test, for a specific class only:

```
bin/magento yireo:test:generate --override-existing 1 --type unit -- 'LokiCheckout_AccountType' '\Loki\CheckoutAccountType\Config\Source\AccountTypeOptions'
```

### AI generated tests

[](#ai-generated-tests)

This module also offers to generate unit tests or integration tests by using AI. The tests generated might not always be perfect and might not even work. To the least, they offer you a kickstart instead of needing to code things yourself.

The following coding AIs are currently supported:

- OpenAI (ChatGPT)
- Anthropic (Claude AI)

Both require an API key to be used. Note that these AI platforms will bill you according to your usage.

In the Store Configuration under **Yireo &gt; Test Generator** you can enable each AI and configure an API key.

### Extending test types

[](#extending-test-types)

The Integration Tests can be created by using a custom generator. For instance, there is a `ConfigTestGenerator` which allows for a specific config test case to be created, as long as the PHP class name matches with `*\Config\Config`.

```

                YireoTraining\ExampleTestGenerator\Generator\IntegrationTest\CustomTestGenerator

```

This generator class needs to implement `\Yireo\TestGenerator\Generator\IntegrationTest\SourceTestGeneratorInterface`. See the `\Yireo\TestGenerator\Generator\IntegrationTest\ConfigTestGenerator` for a full example.

Todo
----

[](#todo)

- Move the AI mechanisms in separate modules
- Allow to configure the AI prompt yourself
- Add a dry-run flag

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance73

Regular maintenance activity

Popularity19

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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 ~144 days

Total

4

Last Release

201d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1373981?v=4)[Yireo](/maintainers/yireo)[@yireo](https://github.com/yireo)

---

Top Contributors

[![jissereitsma](https://avatars.githubusercontent.com/u/7670482?v=4)](https://github.com/jissereitsma "jissereitsma (37 commits)")

### Embed Badge

![Health badge](/badges/yireo-magento2-test-generator/health.svg)

```
[![Health](https://phpackages.com/badges/yireo-magento2-test-generator/health.svg)](https://phpackages.com/packages/yireo-magento2-test-generator)
```

###  Alternatives

[yireo/magento2-checkouttester2

Checkout Tester for Magento 2

93477.4k1](/packages/yireo-magento2-checkouttester2)[reach-digital/magento2-test-framework

76306.9k2](/packages/reach-digital-magento2-test-framework)[mage-os/module-automatic-translation

Automatic AI content translation for Mage-OS.

277.1k](/packages/mage-os-module-automatic-translation)

PHPackages © 2026

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