A tool for displaying software specifications with their unit test status.

1.0.3 2018-07-19 15:22 UTC

This package is auto-updated.

Last update: 2020-05-06 11:43:37 UTC


Speculator is a small self contained web server present software specifications and the status of unit tests covering those specifications.


Use composer require gcdtech/speculator


Note these examples assume your bin-dir composer property is set to "bin/". If yours differs be sure to change the path to speculator.

Invoke speculator using the terminal:

bin/speculator [pathtospecs] [pathtotests] [bootstrap-php-file]

Or create a speculator.json file in the same folder e.g.

  "specs-dir": "specs",
  "tests-dir": "tests/unit",
  "bootstrap": "tests/_bootstrap.php"

And this invoke in a simpler way:


Specification Documents

Specification documents are simply markdown files that live in a folder normally called specs.

index.md should exist as an root entry page.

Create links between your pages in the normal markdown way.

Inject a unit test assessment using the following syntax:


If this exists inside a bullet item then the bullet style will change to a tick or an x depending on the test success. Otherwise a tick or x will be dropped in place of the test marker.

Extended markdown syntax

This project uses the erusev/parsedown-extra parser for markdown which provides a range of additional markdown goodies.