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

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

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

Classes to parse git repositories in search for tests, gives a list of tests with their owner to create a ranking of tests written.

1.2.2(4y ago)72721MITPHP

Since Jun 14Pushed 4y ago3 watchersCompare

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

READMEChangelog (10)Dependencies (2)Versions (19)Used By (1)

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

[](#game-of-tests)

[![Packagist](https://camo.githubusercontent.com/58b733f8559159bb0491b4d779fc04c87c656dfb00113fb5fca3fb3c974538dd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f737769736e6c2f67616d652d6f662d74657374732e7376673f6d61784167653d32353932303030)](https://packagist.org/packages/swisnl/game-of-tests) [![Build Status](https://camo.githubusercontent.com/76f9ec251dda032c505d8e77aca582d4bafa7f1ebeab28ec44ae55942e05e3b9/68747470733a2f2f7472617669732d63692e6f72672f737769736e6c2f67616d652d6f662d74657374732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/swisnl/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 to use
----------

[](#how-to-use)

### Remote

[](#remote)

You can inspect a remote repository as follows. This will create a local repository in the path specifiek in `\Swis\GoT\Settings` and use that to find the tests and test owners.

```
$settings = \Swis\GoT\Settings\SettingsFactory::create();
$inspector = new \Swis\GoT\Inspector($settings);
$repository = $inspector->getRepositoryByUrl('git@github.com:swisnl/game-of-tests.git');
$results = $inspector->inspect($repository);
```

### Local

[](#local)

If you have a local repository, you can also use that directly, for example if you have a set of base repositories as backups, that it fine.

```
$settings = \Swis\GoT\Settings\SettingsFactory::create();
$inspector = new \Swis\GoT\Inspector($settings);
$repository = $inspector->getRepositoryByPath('/path/to/repos');
$results = $inspector->inspect($repository);
```

### Settings

[](#settings)

You can use the `\Swis\GoT\Settings` class set some settings for the package. It lists the available parsers, some paths that are skipped by default and the path where the remote repositories are stored localy. Just pass the settings to the incspector. If you want to get a bare Settings object from the factory, pass false to the create function.

```
// Create a bare settings object.
$settings = \Swis\GoT\Settings\SettingsFactory::create(false);
```

Parsers
-------

[](#parsers)

There are currently 7 parsers defined. PhpUnit, Codeception and Behat for PHP and Ava/Tape, Jasmine/Jest/Mocha and QUnit for JavaScript and True for SCSS. A parser is a small class that defines how to find files that are tests, and how to count tests for that type. N.B. Some JavaScript test frameworks are combined in one parser because they use the same syntax.

A parser return an array with `\Swis\GoT\Result` objects that contain the information on the test.

Example command
---------------

[](#example-command)

The repository includes a small example command for Laravel, should you want to want to use it there.

Want an implementation as a Laravel service provider? Check out [swisnl/game-of-tests-laravel](https://github.com/swisnl/game-of-tests-laravel).

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 90.2% 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 ~120 days

Recently: every ~301 days

Total

16

Last Release

1810d ago

Major Versions

0.2.2 → 1.0.02016-08-02

### 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 (46 commits)")[![JaZo](https://avatars.githubusercontent.com/u/3475007?v=4)](https://github.com/JaZo "JaZo (5 commits)")

---

Tags

phpstatisticstestinggame-of-tests

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[phpro/grumphp

A composer plugin that enables source code quality checks.

4.3k15.5M904](/packages/phpro-grumphp)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[orchestra/testbench

Laravel Testing Helper for Packages Development

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

Official version of pdepend to be handled with Composer

954110.9M815](/packages/pdepend-pdepend)

PHPackages © 2026

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