PHPackages                             swisnl/game-of-tests-laravel - 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. swisnl/game-of-tests-laravel

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

swisnl/game-of-tests-laravel
============================

Laravel package for a Game of Tests.

3.0.2(5y ago)921361MITPHPPHP &gt;=5.5.9

Since Jul 11Pushed 5y ago7 watchersCompare

[ Source](https://github.com/swisnl/game-of-tests-laravel)[ Packagist](https://packagist.org/packages/swisnl/game-of-tests-laravel)[ RSS](/packages/swisnl-game-of-tests-laravel/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (6)Versions (22)Used By (1)

Game of Tests laravel
=====================

[](#game-of-tests-laravel)

[![Latest Stable Version](https://camo.githubusercontent.com/25de71906af7eee7636c24259450d82144b78dc547485c1b2441a9c9d4e6f99a/68747470733a2f2f706f7365722e707567782e6f72672f737769736e6c2f67616d652d6f662d74657374732d6c61726176656c2f762f737461626c65)](https://packagist.org/packages/game-of-tests-laravel) [![License](https://camo.githubusercontent.com/c1b43e08548e6ef457badbc9041750896bd570c4e46f14dfa9932663e18e52e6/68747470733a2f2f706f7365722e707567782e6f72672f737769736e6c2f67616d652d6f662d74657374732d6c61726176656c2f6c6963656e7365)](https://packagist.org/packages/swisnl/game-of-tests-laravel)

This package aims to enable a quick implementation of a Game of Tests in Laravel. Is uses the package [swisnl/game-of-tests](https://github.com/swisnl/game-of-tests/) and gives you a set of commands and basic templates to make your own Game of Tests.

This package serves as a way to search through git repositories and find PHP tests. I was inspired by the the [Spotify testing game](https://github.com/spotify/testing-game) I ran in to.

The reason i wanted to my own implementation for PHP was to help gamify testing in the company and encourage testing in general in the teams.

- [How does it work?](#how-does-it-work)
- [Demo](#demo)
- [Author](#author)
- [Installation](#installation)
- [Available routes](#available-routes)
- [Commands](#commands)
    - [got:inspect-directory](#gotinspect-directory)
    - [got:inspect-github](#gotinspect-github)
    - [got:inspect](#gotinspect)
    - [got:normalize-names](#gotnormalize-names)
- [Configuration](#configuration)
    - [normalize-names](#normalize-names)
    - [route-prefix](#route-prefix)
    - [excluded-remotes](#excluded-remotes)
    - [excluded-filenames](#excluded-filenames)
    - [excluded-authors](#excluded-authors)

How does it work?
=================

[](#how-does-it-work)

The Game of Tests works by scanning Git repositories and scanning for known test files. It uses Git blame to attribute tests to developers. You can update through multiple artisan commands for Github, bare directories, or single repositories.

For now it supports PhpUnit, Codeception and Behat for PHP and Ava, Jasmine, Jest, Mocha, Tape and QUnit for JavaScript and True for SCSS. Feel free to contribute new parsers to [swisnl/game-of-tests](https://github.com/swisnl/game-of-tests/).

Demo
====

[](#demo)

I made a demo available which uses this package and show the Game of Tests for the Laravel Github organisation at . For in information on installing the demo locally, please check out [swisnl/game-of-tests-laravel-demo](https://github.com/swisnl/game-of-tests-laravel-demo).

Author
======

[](#author)

Created by [Björn Brala](https://www.swis.nl/over-ons/bjorn-brala) ([@bbrala](https://github.com/bbrala)).

Installation
============

[](#installation)

1. Require this repository

`composer require swisnl/game-of-tests-laravel`

2. Add the service provider to `app.php`

```
    ...
    \Swis\GotLaravel\Providers\GameOfTestsProvider::class,
    ...
```

3. Publish and run the migration

```
php artisan vendor:publish --tag="migrations"
php artisan migrate
```

4. (optional) Publish the config and views

```
php artisan vendor:publish --tag="config"
php artisan vendor:publish --tag="views"
```

This published the config. See [Configuration](#configuration) for the available options.

Available routes
================

[](#available-routes)

Routes are based on the configuration of [route-prefix](#route-prefix). Default value is `got`.

URLDescription`/got`List ranking of all time`/got/score-for-month`Ranking of the current month. Optionally you can add: `?monthsBack=[months]` to go back any amount of months. For example to get the tests of last month: `app.url/got/score-for-month?monthsBack=1`.`/got/score-for-months-back`Ranking of the last \[months\] months (default 1 month). You can add: `?monthsBack=[months]` to go back any amount of months. For example to get the tests of last 3 months: `app.url/got/score-for-month?monthsBack=3`.`/got/{user}`List of parsed tests of `{user}`. You can add: `?fromMonthsBack=[months]` to go back any amount of months. For example to get the tests of last 3 months: `app.url/got/bjorn-brala?fromMonthsBack=3`, or you can add `?monthsBack=[months]` to show results for \[months\] back. For example to get the tests of last month: `app.url/got/bjorn-brala?monthsBack=1`.Commands
========

[](#commands)

You have a few commands available to update your data.

got:inspect-directory
---------------------

[](#gotinspect-directory)

Inspect a directory with bare resposities.

```
Usage:
  got:inspect-directory [options] [--]

Arguments:
  directory

Options:
      --skippast[=SKIPPAST]  Skip all before (and including) this
      --modified[=MODIFIED]  Repository modified since (uses strtotime)
      --only[=ONLY]          Skip every directory except this one
      --dry-run              Only inspect, do not insert into the database

```

got:inspect-github
------------------

[](#gotinspect-github)

Inspect a github organisation.

```
Usage:
  got:inspect-github [options] [--]

Arguments:
  organisation

Options:
      --modified[=MODIFIED]  Repository modified since (uses strtotime)
      --dry-run              Only inspect, do not insert into the database

```

got:inspect
-----------

[](#gotinspect)

Inspect a Git url.

```
Usage:
  got:inspect [options] [--]

Arguments:
  repositoryUrl

Options:
      --dry-run   Only inspect, do not insert into the database

```

got:normalize-names
-------------------

[](#gotnormalize-names)

Normalize author names based on the [config setting](#normalize-names).

```
Usage:
  got:normalize-names

```

Configuration
=============

[](#configuration)

normalize-names
---------------

[](#normalize-names)

`normalize-names` : array

Normalize the names in the array to one single result. Sometimes people are bad with their git name. This will normalize names of committees to the array key.

### Example

[](#example)

`'Björn Brala' => ['bjorn', 'bbrala']`

route-prefix
------------

[](#route-prefix)

`route-prefix` : string

Prefix for Game of Tests routes.

### Example

[](#example-1)

`'route-prefix' => 'got'`

excluded-remotes
----------------

[](#excluded-remotes)

`excluded-remotes` : array

What remote should not be included in the statistics. This is database LIKE argument.

### Example

[](#example-2)

```
'excluded-remotes' => [
    'git@bitbucket.org:swisnl/test-%',
]
```

excluded-filenames
------------------

[](#excluded-filenames)

`excluded-filenames` : array

What filename should not be included in the statistics. This is database LIKE argument.

### Example

[](#example-3)

```
'excluded-filenames' => [
    'tests/ExampleTest.php',
    'vendor/%',
    'tests/_%',
]
```

excluded-authors
----------------

[](#excluded-authors)

`excluded-authors` : array

What authors should not be included in the statistics. This is database LIKE argument.

cache
-----

[](#cache)

`cache` : boolean (default `true`)

Enable caching for GitHub requests so rate limiting is not a problem.

### Example

[](#example-4)

```
'excluded-authors' => [
    'Automated Commiter',
    'System'
]
```

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 83.7% 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 ~99 days

Recently: every ~242 days

Total

19

Last Release

1860d ago

Major Versions

0.1.2 → 1.0.0-rc12016-07-29

0.1.3 → 1.0.0-rc32016-07-29

1.0.0 → 2.0.02017-08-05

2.1.0 → 3.0.02018-10-01

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8734305?v=4)[SWIS](/maintainers/swisnl)[@swisnl](https://github.com/swisnl)

---

Top Contributors

[![bbrala](https://avatars.githubusercontent.com/u/3294970?v=4)](https://github.com/bbrala "bbrala (36 commits)")[![JaZo](https://avatars.githubusercontent.com/u/3475007?v=4)](https://github.com/JaZo "JaZo (7 commits)")

---

Tags

laravelpackagerankingstatisticstestinglaravelgame-of-tests

### Embed Badge

![Health badge](/badges/swisnl-game-of-tests-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/swisnl-game-of-tests-laravel/health.svg)](https://phpackages.com/packages/swisnl-game-of-tests-laravel)
```

###  Alternatives

[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k42.5M39.8k](/packages/orchestra-testbench)[laravel/octane

Supercharge your Laravel application's performance.

4.0k26.6M214](/packages/laravel-octane)[hotmeteor/spectator

Testing helpers for your OpenAPI spec

3051.6M1](/packages/hotmeteor-spectator)[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11223.5M33](/packages/anourvalar-eloquent-serialize)[guanguans/laravel-soar

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

2228.3k](/packages/guanguans-laravel-soar)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21318.6k3](/packages/ecotone-laravel)

PHPackages © 2026

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