Skip to content

Smoke and feature checks

William Jacoby edited this page Oct 28, 2026 · 1 revision

Smoke and feature checks

Smoke test

phpbb-test-board/smoke_test.py path/to/extension [--ref REF]

Installs the extension from git and loads, as a guest and as the admin:

  • the main board pages;
  • the extension's routes;
  • its ACP, MCP and UCP modules in every mode;
  • its cron tasks.

It then disables the extension, deletes its data and enables it again. It reports any server error, empty page, phpBB debug notice or PHP error-log entry.

Argument/option Meaning
repo Extension Git checkout.
-r, --ref REF Target Git ref; default HEAD.
-w, --with PATH[@REF] Dependency; repeat in enablement order.
-b, --board-dir DIR Board directory, overriding the environment.
-p, --port PORT Server port; default 8083.
-h, --help Usage.
smoke_test.py /path/to/sfscompanion --ref origin/main \
  --with /path/to/stopforumspam --board-dir /path/to/test-board

A remote-tracking ref such as origin/main is resolved locally: fetch the intended updates before testing it. Local uncommitted target changes are not included.

Feature checks

phpbb-test-board/feature_checks.py path/to/extension[@REF] [more extensions...]

Exercises the main feature of each phpbbmodders extension that has a check. One example: a moderator can't warn a user in a group that isn't ticked. --help lists the extensions with checks. To add one, write a check_<name>() function and add it to the CHECKS table, keyed by the extension's composer name.

Arguments are one or more REPO[@REF] values. Options are -w/--with, -b/--board-dir, -p/--port, and -h/--help, with the shared meanings above. Unlike smoke testing, the target ref is appended to the path rather than passed with --ref.

feature_checks.py /path/to/groupwarn@HEAD /path/to/adduser@HEAD \
  --board-dir /path/to/test-board

Supported composer names at the documented revision:

  • phpbbmodders/wiki
  • phpbbmodders/banlist
  • phpbbmodders/bannerrotator
  • phpbbmodders/groupwarn
  • phpbbmodders/documentation
  • phpbbmodders/separatebots
  • phpbbmodders/reassignthumbs
  • phpbbmodders/honeypot
  • phpbbmodders/adduser
  • phpbbmodders/sfscompanion

Dependencies

Pass the other extension's checkout with --with. Repeat it for several, in the order they must be enabled:

phpbb-test-board/smoke_test.py path/to/sfscompanion --with path/to/stopforumspam
  • Install order: --with extensions are installed and enabled first and stay enabled. Only the extension under test goes through smoke_test.py's disable and delete-data round trip.
  • In feature_checks.py: a --with extension is installed only for the extensions whose composer.json requires it.
  • Missing packages: if composer.json requires a package you didn't supply, the scripts print a note naming it.

Both tools document 0 for clean/passed, 1 for detected problems and 2 for bad arguments. Runtime/setup errors also require investigation; a successful smoke test does not establish that every feature works. Feature checks cover registered scenarios only.

Clone this wiki locally