PHPackages                             mano/autotest-bundle - 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. mano/autotest-bundle

ActiveSymfony-bundle[Testing &amp; Quality](/categories/testing)

mano/autotest-bundle
====================

Symfony bundle for automatic routes testing.

v1.1.2(4y ago)31.9kMITPHPPHP &gt;=7.2

Since Dec 17Pushed 4y ago1 watchersCompare

[ Source](https://github.com/hejnym/autotest-bundle)[ Packagist](https://packagist.org/packages/mano/autotest-bundle)[ RSS](/packages/mano-autotest-bundle/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (6)Dependencies (4)Versions (7)Used By (0)

Autotest bundle
===============

[](#autotest-bundle)

Symfony bundle for automatic routes testing - check the response code of all static routes defined in the framework. It supports both PHPUnit and Codeception testing. The module lists all the available routes with GET method, add default values and filter just those that does not contain wildcards. The routes that were not matched can be added manually though - see [config](#include-paths). Then the response is checked just for the successful code.

In order to access authorised routes, set admin email in the config (or any user that has super privilege). There must be 'email' property on the user entity (or at least getter). Some routes might need to be excluded though (ex. '/logout','/login') as they are redirected.

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

[](#installation)

- use [Composer](https://getcomposer.org/download/) to install the bundle

```
composer require mano/autotest-bundle --dev
```

- enable the bundle in *config/test/bundles.php* by pasting new array item

```
[
    ...
    Mano\AutotestBundle\AutotestBundle::class => ['dev' => true, 'test' => true],
]
```

Config
------

[](#config)

create file *config/packages/test/autotest.yaml* and override the defaults if necessary.

```
# Default configuration for extension with alias: "autotest"
autotest:

    # Paths that will be excluded from the test. Exclusion is made before resolving paths therefore the regex may include curly braces (if the route to be excluded contains them).
    exclude: []

    # Paths that will be included into the test as they could not be resolved automatically. Array of object in format name:{nameOfRoute}, path:{manuallyAddedPath}'
    include: []

    # Custom resolver to be used - must implement PathResolverInterface
    resolver: null

    # Email of admin that can access all the routes - if authorisation needed.
    admin_email: null

    # User repository to be used - must have email property defined.
    user_repository: App\Repository\UserRepository
```

### exclude paths

[](#exclude-paths)

Some routes might need to be excluded though (ex. '/logout','/login') as they are redirected. It is advisable to declare allowed methods in the route annotation, so that you do not need to exclude POST only routes here. Regex can be used here to match multiple routes at once.

```
exclude:
   - '/logout'
   - '/login'
   - '/foo/{name}' # if the route had default name (and therefore resolved)
   - '/foo/.*' # pattern will be wrapped by ~^regex$~i
```

### include paths

[](#include-paths)

All the routes that could not be automatically resolved (contain wildcard that can not be filled from defaults) can be listed here to be included in the test.

**The full list of unresolved paths is outputted at the beginning of the test**. A route listed in included paths is removed from the output.

```
include:
  - name: route_name
    path: '/foo/bar'
]
```

Usage
-----

[](#usage)

**Cache needs to be cleared after modifications in the project before running the test.**

### PHPUnit

[](#phpunit)

Add entry to phpunit.xml(.dist)

```

        tests -->
        vendor/mano/autotest-bundle/src/Test/

```

run

```
php bin/phpunit

```

Alternatively you can skip editing phpunit.xml and just extend any test.

```
class someTest extends \Mano\AutotestBundle\Test\PhpUnitWebTest
```

If you come across the exception "User repository 'App\\Repository\\UserRepository' not found" and you are sure it exists, register the service as public.

```
# config/services.yaml
services:
    ...
    App\Repository\UserRepository:
      public: true
```

### Codeception

[](#codeception)

- add the module to a suite (*functional.suite.yml*)

```
- \Mano\AutotestBundle\Test\CodeceptionAutotestModule
```

- add module method *autotest* to any cest

```
class fooCest
{
    public function testStaticPages(FunctionalTester $I)
    {
        $I->autotest();
    }
}
```

**Codeception is stricter with login - different authenticators (api keys) will not work out of the box.**

Extension
---------

[](#extension)

The used path resolver is simple - it just adds defaults to the path and takes only GET method that does not contain wildcards (after completing defaults).

Custom resolver can be used and referenced from config. The resolver must implement *Mano\\AutotestBundle\\PathResolverInterface*.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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 ~12 days

Total

6

Last Release

1586d ago

PHP version history (2 changes)1.0.0PHP &gt;7.2

v1.1.0PHP &gt;=7.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/132727?v=4)[Mano](/maintainers/mano)[@mano](https://github.com/mano)

---

Top Contributors

[![hejnym](https://avatars.githubusercontent.com/u/48101674?v=4)](https://github.com/hejnym "hejnym (1 commits)")[![petr-panoska](https://avatars.githubusercontent.com/u/19664449?v=4)](https://github.com/petr-panoska "petr-panoska (1 commits)")

---

Tags

testing

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/mano-autotest-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/mano-autotest-bundle/health.svg)](https://phpackages.com/packages/mano-autotest-bundle)
```

###  Alternatives

[liip/functional-test-bundle

This bundles provides additional functional test-cases for Symfony applications

64910.9M89](/packages/liip-functional-test-bundle)[liip/test-fixtures-bundle

This bundles enables efficient loading of Doctrine fixtures in functional test-cases for Symfony applications

1778.8M46](/packages/liip-test-fixtures-bundle)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1155.2k](/packages/rcsofttech-audit-trail-bundle)[shopsys/http-smoke-testing

HTTP smoke test case for testing all configured routes in your Symfony project

67266.6k2](/packages/shopsys-http-smoke-testing)[acquia/orca

A tool for testing a company's software packages together in the context of a realistic, functioning, best practices Drupal build

30914.4k](/packages/acquia-orca)[incenteev/translation-checker-bundle

CLI tools to check translations in a Symfony project

36589.1k](/packages/incenteev-translation-checker-bundle)

PHPackages © 2026

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