PHPackages                             lain/laravel-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. lain/laravel-test-generator

ActiveLibrary[Testing &amp; Quality](/categories/testing)

lain/laravel-test-generator
===========================

Laravel package for generating api test automatically

v1.0.3(3y ago)016MITPHPPHP ^8.0

Since Jul 28Pushed 3y ago1 watchersCompare

[ Source](https://github.com/xuliangTang/laravel-test-generator)[ Packagist](https://packagist.org/packages/lain/laravel-test-generator)[ RSS](/packages/lain-laravel-test-generator/feed)WikiDiscussions main Synced 1mo ago

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

laravel-test-generator
======================

[](#laravel-test-generator)

Laravel package for generating api test automatically.

[![tests](https://github.com/xuliangTang/laravel-test-generator/workflows/tests/badge.svg?branch=main)](https://github.com/xuliangTang/laravel-test-generator/actions?query=workflow%3Atests+branch%3Amain)[![PHP Version Require](https://camo.githubusercontent.com/761ac7ffbc3aecc364f95f70bcc799165e9f9c16c2a5073fb687fbae3066a280/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6c61696e2f6c61726176656c2d746573742d67656e657261746f72)](https://packagist.org/packages/lain/laravel-test-generator)[![Latest Stable Version](https://camo.githubusercontent.com/25ba92603f51b864a6013cadc610c08ddb3b92be1d2d6ed83b66de6655ace321/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f78756c69616e6754616e672f6c61726176656c2d746573742d67656e657261746f723f7374796c653d666c6174)](https://packagist.org/packages/lain/laravel-test-generator)

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

[](#installation)

```
$ composer require lain/laravel-test-generator
```

Configuration
-------------

[](#configuration)

Copy the package config to your local config with the publish command:

```
$ php artisan vendor:publish --tag=test-generator
```

This will add a new config to `config/test-generator.php`:

```
return [
    'get_token' => 'app(Helper::class)->getAccessTokenForEmailToOrg()',
];
```

Usage
-----

[](#usage)

Create [`test-swagger.json`](https://github.com/xuliangTang/laravel-test-generator/blob/main/tests/test-swagger.json) in your project root directory, It contains the api tests that need to be created, Please make sure it conforms to OpenAPI format (swaager 3.0).

To do so, simply run `php artisan test:generate TEST_FILE_NAME` in your project root. This will write all the test cases into the file based on test-swagger json.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 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 ~27 days

Total

4

Last Release

1302d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/168ff6c6f83c59ae761f992784f7a5aecebe55c94709d7633572f2953760f707?d=identicon)[lain](/maintainers/lain)

---

Top Contributors

[![xuliangTang](https://avatars.githubusercontent.com/u/33924057?v=4)](https://github.com/xuliangTang "xuliangTang (10 commits)")

---

Tags

testlaravelgenerator

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lain-laravel-test-generator/health.svg)

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

###  Alternatives

[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)[infyomlabs/laravel-generator

InfyOm Laravel Generator

3.8k2.3M13](/packages/infyomlabs-laravel-generator)[orchestra/workbench

Workbench Companion for Laravel Packages Development

8017.0M43](/packages/orchestra-workbench)

PHPackages © 2026

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