Log inGet started
Package

tests.toolbox

Newest version

This package holds more than this page lists. See all of its files in its world.

README.md

tests.run

Run the engine test suite and return structured results — every registered suite by default, a single named suite, or a chosen subset. Each run writes a Markdown and a JSON report to the temporary source area and can save an extra copy in a format you pick. Every suite runs through its own cooperative coroutine so multi-frame tests yield across engine frames correctly; an async run schedules the whole sweep as one task and returns its id immediately. Testing is an edit-mode authoring concern — the operation is refused in play mode, since it spawns and despawns entities, loads scenes, and flips modes.

A suite is named by its .testSuite folder name, its identity (asset.identity, such as kit.kit or aKit.tests.atmos), its path or its guid. A name several suites share runs none of them, and a name that selects no suite, or a suites list holding no name, fails the run whatever else it ran; the note names what each such name could select. The result's ran names every suite that ran by its identity and path, and missing and ambiguous name the names that selected none or several.

onWorker = true runs each suite inside a worker job (jobs.dispatch) rather than on the engine thread, and records onWorker = true on the result. The result keeps the engine-thread shape; a suite the worker cannot start counts as one failed result whose error is the text the worker gave. From the shell, ON_WORKER=1 ./scripts/run_luau_tests.sh <suite> adds the option.