kbtaniguchi/vaadin-ddd-demo

JGivenのHtmlレポートをgradleのtaskで出力する

Opened this issue · 2 comments

http://jgiven.org/jgiven-report/html5/
↑みたいなレポートが出せるので出したい。

公式ドキュメント( http://jgiven.org/userguide/#_html_report )によるとcom.tngtech.jgiven.gradle-pluginを使えば出せるらしいがよくわからない。とりあえずpluginを入れてはある。
https://github.com/bububu10/vaadin-ddd-demo/blob/8cbb99d3f0b2294f54f54ec8949691ca198ba4eb/demo-ui/build.gradle#L19-L23

実行すると↓のようになる。sourceになるjsonは出てるので、そのjsonが入っているディレクトリへの参照をどこかで設定すればいいんだろうが、どうやって設定すればいいのかが分からない。(build.gradleかapplication-test.propertiesのどちらかで設定できるといいな)

13:00:07: Executing external task 'jgivenTestReport'...
Using Gradle Vaadin Plugin 1.2.5
:demo-ui:jgivenTestReport NO-SOURCE

BUILD SUCCESSFUL in 13s
13:00:20: External task execution finished 'jgivenTestReport'.

com.example.demo.GenerateHtmlReport を手動実行すれば出せるようにはした。
demo-ui/build配下に出力される。

application-test.propertiesはテスト用のサーバが起動するときに読み込まれるプロパティなので、ここでは設定できないっぽい。build.gradleでたぶん設定できる。