PHPackages                             danon910/blitzy - 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. danon910/blitzy

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

danon910/blitzy
===============

Laravel test generator package

1.0.0(1y ago)1631MITPHPPHP ^8.1

Since May 30Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Danon910/blitzy)[ Packagist](https://packagist.org/packages/danon910/blitzy)[ RSS](/packages/danon910-blitzy/feed)WikiDiscussions master Synced 1mo ago

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

Blitzy ⚡
========

[](#blitzy-)

Blitzy is a lightweight package for Laravel that automates test generation. It is designed to speed up the testing process and make developers' lives easier.

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

[](#installation)

### 1. Install package using composer

[](#1-install-package-using-composer)

```
composer require danon910/blitzy --dev
```

### 2. Add the ServiceProvider in `config/app.php`

[](#2-add-the-serviceprovider-in-configappphp)

```
\Danon910\blitzy\Providers\BlitzyProvider::class,
```

### 3. Publish config

[](#3-publish-config)

```
php artisan vendor:publish --provider="Danon910\blitzy\Providers\BlitzyProvider" --tag=config
```

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

[](#configuration)

Before use Blitzy you should customize its behavior for your requirements, you can edit the configuration file located at `config/blitzy.php`.

What does the package do?
-------------------------

[](#what-does-the-package-do)

This package generates `Test` and `Trait` files in the `tests` folder with the correct namespace and a simple structure, ready for writing real working tests.

Commands
--------

[](#commands)

### Generate simple test

[](#generate-simple-test)

```
php artisan blitzy:generate "{path}" --type=smoke --force
```

### Generate test with more precision

[](#generate-test-with-more-precision)

```
php artisan blitzy:generate "{path}" --type=smoke --feature=Post --methods=index,show --force
```

#### Required params

[](#required-params)

`{path}` Path of tested class

`--type` smoke / integration / unit

#### Optional params

[](#optional-params)

`--feature` Name of feature which will be saved in docblock

`--methods` Provide methods which should be parsed (e.g. index,show)

`--force` If you want to overwrite already generated existing test files

Usage
-----

[](#usage)

### Generate smoke test

[](#generate-smoke-test)

```
php artisan blitzy:generate "App\Http\Controllers\PostController" --type=smoke --force
```

### Generate integration test

[](#generate-integration-test)

```
php artisan blitzy:generate "App\Services\PostService" --type=integration --force
```

### Generate unit test

[](#generate-unit-test)

```
php artisan blitzy:generate "App\Services\PostService" --type=unit --force
```

Examples
--------

[](#examples)

### Smoke test

[](#smoke-test)

```
