Skip to content
mikestead edited this page Aug 22, 2011 · 33 revisions

Welcome to the MassiveUnit wiki!

Quick Start Guide

Run the following commands to install munit, configure it for a project and then run some example tests for all supported platforms.

> haxelib install munit
> mkdir ExampleProject
> cd ExampleProject
> haxelib run munit config
> haxelib run munit test

And if you'd like to test say, just the JavaScript and ActionScript 3.0 targets

> haxelib run munit test -js -as3

A useful tip is to add an alias for munit to you terminal or cmd prompt to save you typing haxelib run munit .. each time.

MUnit Testing Framework

munit uses haXe metadata to execute test cases at runtime. To create a new test case, simply create an empty class and use the following metadata syntax:

@Test
public function testExample():Void
{
	Assert.isTrue(true);
}

For detailed information on TestCase metadata see Working with test classes

MUnit Build Tool

The munit build tool makes working with unit tests easier and quicker.

To check that the tool is installed

haxelib run munit

This should display summary help information for all the commands. We recommend using the inbuilt help for detailed usage and instructions

haxelib run munit help <command>

More information