PHPackages                             renatomarinho/laravel-wave-test - 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. renatomarinho/laravel-wave-test

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

renatomarinho/laravel-wave-test
===============================

Automatically generates tests for Laravel applications

1.0.2(1y ago)1112Apache-2.0PHPPHP ^8.1

Since Feb 14Pushed 1y ago1 watchersCompare

[ Source](https://github.com/renatomarinho/laravel-wave-test)[ Packagist](https://packagist.org/packages/renatomarinho/laravel-wave-test)[ RSS](/packages/renatomarinho-laravel-wave-test/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

Laravel Wave Test
=================

[](#laravel-wave-test)

**Laravel Wave Test** is a tool designed to streamline the process of creating and running tests in Laravel projects. This package provides two main commands: `generate:tests` to automatically generate test files based on your application's routes, and `execute:tests` to run all tests within the `Feature` directory and its subdirectories.

> **Note:** This package is intended to accelerate the initial creation of tests. The generated `*Test.php` files may require manual adjustments to properly fit the specific requirements of your project.

---

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

[](#installation)

1. **Install the package via Composer:**

    ```
    composer require renatomarinho/laravel-wave-test
    ```
2. **Verify the ServiceProvider Registration:**The package includes a `ServiceProvider` that will be registered automatically in Laravel 5.5+ (thanks to [Package Auto-Discovery](https://laravel.com/docs/8.x/packages#auto-discovery)).

    If you're using an older version of Laravel or auto-discovery is disabled, add the following provider to the `providers` array in the `config/app.php` file:

    ```
    RenatoMarinho\LaravelWaveTest\TestGeneratorServiceProvider::class,
    ```
3. **Publish Optional Configurations (if needed):**

    ```
    php artisan vendor:publish --provider="RenatoMarinho\LaravelWaveTest\TestGeneratorServiceProvider"
    ```

---

Available Commands
------------------

[](#available-commands)

### 1. `php artisan generate:tests`

[](#1-php-artisan-generatetests)

This command scans all registered routes in your Laravel project and generates corresponding test files in the `tests/Feature` directory. Each route will be converted into a test file, organized into folders based on the route name.

#### Features:

[](#features)

- Organizes tests into folders based on the first segment of the route name.
- Converts route names like `example.update` into `ExampleUpdateTest.php`.
- Automatically mocks route parameters using Faker.

#### Example Generated Structure:

[](#example-generated-structure)

```
tests/
└── Feature/
    ├── Example/
    │   ├── IndexTest.php
    │   ├── StoreTest.php
    │   ├── ShowTest.php
    │   ├── UpdateTest.php
    │   └── DestroyTest.php
    └── AnotherFolder/
        └── AnotherTest.php

```

#### Usage:

[](#usage)

```
php artisan generate:tests
```

---

### 2. `php artisan execute:tests`

[](#2-php-artisan-executetests)

This command lists all folders inside `tests/Feature` and runs tests in those folders using PHPUnit. It simplifies the process of executing all tests organized in subfolders.

#### Usage:

[](#usage-1)

```
php artisan execute:tests
```

#### Example Output:

[](#example-output)

```
Executing tests in the Feature directory...
Running tests for folder: Example
PHPUnit 11.5.7 by Sebastian Bergmann and contributors.

..
Time: 00:01.234, Memory: 20.00 MB

OK (2 tests, 2 assertions)
Tests passed for folder: Example
All tests executed successfully!

```

---

How to Use
----------

[](#how-to-use)

1. **Generate Automatic Tests:**Run the following command to generate test files based on your application's routes:

    ```
    php artisan generate:tests
    ```

    > **Tip:** Ensure your routes are named appropriately (e.g., `example.index`, `example.store`) to ensure proper test generation.
2. **Adjust the Generated Tests:**After generation, review the created `*Test.php` files and make necessary adjustments to align them with your project's specific requirements. For example:

    - Change HTTP request methods (`get`, `post`, `delete`, etc.) as needed.
    - Customize mocked values to match the data expected by your controllers.
3. **Run All Tests:**Use the following command to execute all tests within the `Feature` directory and its subdirectories:

    ```
    php artisan execute:tests
    ```

---

Limitations
-----------

[](#limitations)

- The generated tests serve as a starting point and may need adjustments to function correctly within the context of your project.
- Currently, the package does not support generating complex integration tests or tests involving multiple scenarios.
- The mocking logic uses default values from Faker. You may need to customize these values to meet your application's validation requirements.

---

Roadmap
-------

[](#roadmap)

- **Add Artificial Intelligence (AI) Integration:** We plan to incorporate AI to improve the quality of generated tests, making them more robust and aligned with best practices.
- **Support for Integration Tests:** Expand the package to generate integration tests in addition to functional tests.
- **Enhanced Parameter Mocking:** Implement advanced logic to detect parameter types and generate more accurate mock values.
- **Support for Other Laravel Features:** Add support for testing events, queues, jobs, and other Laravel features.

---

Contribution
------------

[](#contribution)

Contributions are welcome! If you encounter bugs or have suggestions for improvements, please open an issue or submit a pull request to the official repository.

---

License
-------

[](#license)

This package is distributed under the [Apache 2.0](LICENSE). Feel free to use, modify, and distribute it according to the terms of the license.

---

We hope this package helps you save time and effort while ensuring your Laravel application remains well-tested. Happy coding! 🚀

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance43

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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

Total

2

Last Release

447d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c115f2233ad835e7b1374faa198dd5c0188174cc861e1efa5f25a9e49f5f604c?d=identicon)[renatomarinho](/maintainers/renatomarinho)

---

Top Contributors

[![renatomarinho](https://avatars.githubusercontent.com/u/26571?v=4)](https://github.com/renatomarinho "renatomarinho (6 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/renatomarinho-laravel-wave-test/health.svg)

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

###  Alternatives

[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)[hotmeteor/spectator

Testing helpers for your OpenAPI spec

3021.4M1](/packages/hotmeteor-spectator)[orchestra/workbench

Workbench Companion for Laravel Packages Development

8017.0M43](/packages/orchestra-workbench)[botble/git-commit-checker

Check coding standard &amp; code syntax with Git pre-commit hook.

47186.4k1](/packages/botble-git-commit-checker)[guanguans/laravel-soar

SQL optimizer and rewriter for laravel. - laravel 的 SQL 优化器和重写器。

2227.8k](/packages/guanguans-laravel-soar)[spurwork/spectator

Testing helpers for your OpenAPI spec

3021.5k](/packages/spurwork-spectator)

PHPackages © 2026

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