Runs utest tests associated with an OpenFL project. Detects classes that extend utest.Test and automatically generates a runner for them.
This library is not yet available on Haxelib, so you'll need to install it and its dependencies from Github.
haxelib git openfl-utest-tools https://github.com/feathersui/openfl-utest-tools.gitCreate a directory named tests in the same parent directory as your OpenFL project.xml file. This will be the class path for your tests.
Run the following command in a terminal.
haxelib run openfl-utest-tools test nekoThe command above runs the tests using the neko target. Other OpenFL targets are supported, including html5, windows, mac, linux, and hl.
When running tests on the html5 target, Node.js is required. The Playwright npm module is used to run tests in Chromium, Firefox, and WebKit.
testbuilds and runs tests. Thetestcommand has a few optional parameters.--sourcesets a custom source path for the tests. Default: tests--projectsets a custom path to the OpenFL project file. Default: project.xml--includesets a custom glob pattern for test files to include. Default: **/*.hx--excludesets an optional glob pattern for test files to exclude.--verbosedisplays more detailed output.
helpdisplays help about the available commands.