tink_testrunner 0.5.6

Released 2017-04-22.

To install, run:

haxelib install tink_testrunner 0.5.6

See using Haxelib in Haxelib documentation for more information.

Current version0.5.6
StatisticsInstalled 424 times


tink_testrunner Build Status

tink_testrunner logically breaking down a test into several major parts:


Contains the result, a human-readable description and position of an assertion.

class Assertion {
	public var holds(default, null):Bool;
	public var description(default, null):String;
	public var pos(default, null):PosInfos;


A collection of Assertion.

A naive repsentation would be Array<Assertion>. But we chose to use Stream<Assertion> in order to support async tests. After all, Stream is the async counterpart of Array.


A function that emits Assertions.

So it is basically Void->Assertions. However, in order to support more fine-grain controls on what tests to be included/excluded, the actual implementation of a Case does include some extra control informations.

interface Case {
	var info:CaseInfo; // meta info such as descriptions, etc
	var timeout:Int; // timeout in ms
	var include:Bool; // include only this case while running
	var exclude:Bool; // exclude this case while running
	function execute():Assertions;


A collection of Cases.

So basically it is Array<Case>. However, we may also want to execute some pre/post actions for a case, so the actual implementation looks like this:

interface Suite {
	var info:SuiteInfo; // meta info
	var cases:Array<Case>;
	function startup():Promise<Noise>; // to be run once before all cases
	function before():Promise<Noise>; // to be run before each cases
	function after():Promise<Noise>; // to be run after each cases
	function shutdown():Promise<Noise>; // to be run once after all cases


A colllection of Suites.

This time it is really just Array<Suite>.


A Runner will take a Batch and run it, then emits the results to a reporter.


A Reporter reports the progress of a Runner to user. There is not much to say about it.