Skip to content

Testing a project

Greg Bowler edited this page May 18, 2026 · 1 revision

gt test runs the test suites configured in your project metadata and gives you one result summary at the end.

Basic usage

gt test

The command looks for common test scripts and runs each suite it finds.

At the moment that means:

  • composer.json with a scripts.test entry, which runs as composer test
  • package.json with a scripts.test entry, which runs as npm run test

Both suites are optional. If both are configured, gt test runs both of them even if the first one fails.

Typical examples

If your composer.json contains:

{
  "scripts": {
    "test": "vendor/bin/phpunit"
  }
}

then gt test will run:

composer test

If your package.json contains:

{
  "scripts": {
    "test": "vitest run"
  }
}

then gt test will also run:

npm run test

Exit behaviour

  • returns success when every discovered test suite passes
  • returns failure when any discovered test suite fails
  • returns failure when no supported test suites are configured

That makes it suitable for local development and for CI steps that want one command to cover both PHP and JavaScript tests.


For the full command list, continue with Command reference.

Clone this wiki locally