Download the PHP package swisnl/game-of-tests-laravel without Composer
On this page you can find all versions of the php package swisnl/game-of-tests-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download swisnl/game-of-tests-laravel
More information about swisnl/game-of-tests-laravel
Files in swisnl/game-of-tests-laravel
Package game-of-tests-laravel
Short Description Laravel package for a Game of Tests.
License MIT
Informations about the package game-of-tests-laravel
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 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 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?
- Demo
- Author
- Installation
- Available routes
- Commands
- got:inspect-directory
- got:inspect-github
- got:inspect
- got:normalize-names
- Configuration
- normalize-names
- route-prefix
- excluded-remotes
- excluded-filenames
- excluded-authors
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.
Demo
I made a demo available which uses this package and show the Game of Tests for the Laravel Github organisation at http://gameoftests.swis.nl. For in information on installing the demo locally, please check out swisnl/game-of-tests-laravel-demo.
Author
Created by Björn Brala (@bbrala).
Installation
- Require this repository
composer require swisnl/game-of-tests-laravel
-
Add the service provider to
app.php
-
Publish and run the migration
- (optional) Publish the config and views
This published the config. See Configuration for the available options.
Available routes
Routes are based on the configuration of route-prefix. Default value is got
.
URL | Description |
---|---|
/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
You have a few commands available to update your data.
got:inspect-directory
Inspect a directory with bare resposities.
got:inspect-github
Inspect a github organisation.
got:inspect
Inspect a Git url.
got:normalize-names
Normalize author names based on the config setting.
Configuration
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
'Björn Brala' => ['bjorn', 'bbrala']
route-prefix
route-prefix
: string
Prefix for Game of Tests routes.
Example
'route-prefix' => 'got'
excluded-remotes
excluded-remotes
: array
What remote should not be included in the statistics. This is database LIKE argument.
Example
excluded-filenames
excluded-filenames
: array
What filename should not be included in the statistics. This is database LIKE argument.
Example
excluded-authors
excluded-authors
: array
What authors should not be included in the statistics. This is database LIKE argument.
cache
cache
: boolean (default true
)
Enable caching for GitHub requests so rate limiting is not a problem.
Example
All versions of game-of-tests-laravel with dependencies
laravel/framework Version 5.5.*|5.6.*|5.7.*
gitonomy/gitlib Version ^1.0
swisnl/game-of-tests Version ^1.0
knplabs/github-api Version ^2.0
madewithlove/illuminate-psr-cache-bridge Version ^1.0
php-http/client-implementation Version ^1.0