From 7cbcec85b3e322cec39c02e4657ff9ec793b28c8 Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Fri, 1 Jan 2016 10:09:25 -0800 Subject: [PATCH] Document tests. --- plug-ins/index.html | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/plug-ins/index.html b/plug-ins/index.html index cca7db7..ec30c4d 100644 --- a/plug-ins/index.html +++ b/plug-ins/index.html @@ -202,7 +202,46 @@ class BuildConfig { Take a look at the variants example project to see an actual example using variants and BuildConfig.

-

Application

+ +

Tests

+

+ Kobalt will automatically attempt to run test classes found in the test directory with the + correct runner (e.g. TestNG, JUnit, Spek, etc...). Additionally, you can configure how + these tests are run with the test{} directive, which accepts the following + parameters: +

+
+
args
+
The arguments passed to the runner
+
includes
+
Which classes to include. Note that the parameters to this function are path globs (see below)
+
excludes
+
Which classes to exclude. Note that the parameters to this function are path globs (see below)
+
+

+ Here are a few examples of test{} directives: +

+
+test {
+    args("-log", "1", "src/test/resources/testng.xml")
+}
+

+ Specifying includes and excludes: +

+
+test {
+    includes("**/D*.class")
+    excludes("**/BrokenTest.class", "**/NotYetImplementedTest.class")
+}
+

+ Note that includes and excludes are path globs: they must match the + entire path of the class and they can use ** and * to match any + directory or file name. +

+ + + +

Application

The "application" plug-in lets you run your application directly from kobaltw. You configure it as follows: