Skip to content

Instantly share code, notes, and snippets.

@tmskst
Created June 17, 2014 18:08
Show Gist options
  • Save tmskst/302e20c437cebe789316 to your computer and use it in GitHub Desktop.
Save tmskst/302e20c437cebe789316 to your computer and use it in GitHub Desktop.
MUnitのテスト結果をNanoTestでIDEに出力

MUnitのTestMain.hxを書き換える。 addResultClientPrintClientBaseを与える。

// TestMain.hx#new
var runner:TestRunner = new TestRunner(client); 
runner.addResultClient(new HTTPClient(new PrintClientBase()));

すると例えばターゲットがAS3ならば、report/test/simple/as3/output.txtが出力されるので これをNanoTestRunner.readResultに与える。

# nano.hxml
-lib nanotest
--macro nanotest.NanoTestRunner.readResult('report/test/simple/as3/output.txt', ['src','test'], "MUnit")

FlashDevelopならプロジェクト設定のBuildタブからPost-Build Command LineからHXMLを呼び出しすようにしておく。

$(CompilerPath)\haxe.exe $(ProjectDir)\nano.hxml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment