Skip to content

Generating Test Classes

massiveinteractive edited this page Dec 22, 2010 · 3 revisions

The gen command is used to create and update the test runner classes.

The 'gen' task is used to create and update the test runner classes. The first time this command runs it will generate a TestMain, TestSuite and ExampleTest class in the test src directory provided. On subsequent runs it will only update the TestSuite with all the test files in the src directory so not to overwrite any customisation in TestMain or test.hxml build file.

All test classes must follow the following naming convention to be included in the generated TestSuite: **Test.hx * (e.g. ExampleTest.hx)

Refer to the generated TestExample for sync and async test usage.

To run this command:

From inside your project directory...

haxelib run munit gen

For detailed help run

haxelib run munit help gen