From fe548e72f810fd59403a695413b542829fd107eb Mon Sep 17 00:00:00 2001 From: vmassol Date: Sun, 23 Mar 2003 12:54:59 +0000 Subject: [PATCH] Added cactus report generation git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113182 13f79535-47bb-0310-9956-ffa450edef68 --- cactus/plugin.jelly | 54 ++ cactus/plugin.properties | 11 +- .../{junit.jsl => cactus.jsl} | 542 +++++++++--------- cactus/xdocs/goals.xml | 15 + cactus/xdocs/properties.xml | 24 +- 5 files changed, 372 insertions(+), 274 deletions(-) rename cactus/src/plugin-resources/{junit.jsl => cactus.jsl} (97%) diff --git a/cactus/plugin.jelly b/cactus/plugin.jelly index 03e33fe4..db299890 100644 --- a/cactus/plugin.jelly +++ b/cactus/plugin.jelly @@ -106,10 +106,64 @@ + + + + + WARNING: You need to define at least one container property of the form cactus.home.[container name]. See the plugin documentation. + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cactus/plugin.properties b/cactus/plugin.properties index b4ea1049..5ec81c66 100644 --- a/cactus/plugin.properties +++ b/cactus/plugin.properties @@ -15,8 +15,8 @@ # Location of Cactus tests in project sources cactus.src.dir = ${basedir}/src/test-cactus -# Location where the plugins puts temporary build-generated files -cactus.target.dir = ${maven.build.dir} +# Location where the plugins puts temporary Cactus build-generated files +cactus.target.dir = ${maven.build.dir}/cactus # Default port on which to start the containers cactus.port = 8080 @@ -29,3 +29,10 @@ cactus.src.excludes = **/AllTests.java,**/Test*All.java # Default webapp context cactus.context = cactustest + +# Decides whether the test result will be printed to the console or +# not. Default is true +cactus.junit.usefile = false + +# Location of junit test reports for the Cactus tests +cactus.reports.dir = ${cactus.target.dir}/test-cactus-reports diff --git a/cactus/src/plugin-resources/junit.jsl b/cactus/src/plugin-resources/cactus.jsl similarity index 97% rename from cactus/src/plugin-resources/junit.jsl rename to cactus/src/plugin-resources/cactus.jsl index c3275203..996ac92f 100644 --- a/cactus/src/plugin-resources/junit.jsl +++ b/cactus/src/plugin-resources/cactus.jsl @@ -1,271 +1,271 @@ - - - - - - - - - - - - - - - -

- [ - summary] - [ - package list] - [ - test cases] -

-
- - - - Name - Tests - Errors - Failures - Time(s) - - - - - - Name - Status - Type - Time(s) - - - - - - - ${htmlescape.getText(current.attribute('message').value)} - - - N/A - -

- - ${htmlescape.getText(current.value())} - - - - - - - - - - JUnit Test Results - - - -

- - - - - - - - - - - - - - - - - - - - - -
TestsErrorsFailuresSuccess rateTime(s)
- - - - - - - - - -
-

- Note: - failures are anticipated and checked for with - assertions while - errors are unanticipated. -

-
- -
- - - - - - - - - - - - - - - - - - - - -
- ${package} - - - - - - - - -
-

- Note: package statistics are not computed recursively, they only - sum up all of its testsuites numbers. -

- - - - - - - - - - - - - - - - - - -
- ${test.attribute('name').value} - - - - - - - - -
-
-
-
- -
- - - - - - - - - - ## test can even not be started at all (failure to load the class) - ## so report the error directly - ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
${testcase.attribute("name").value}FailureErrorSuccess - -
- -
- -
-
-
-
- - - -
+ + + + + + + + + + + + + + + +

+ [ + summary] + [ + package list] + [ + test cases] +

+
+ + + + Name + Tests + Errors + Failures + Time(s) + + + + + + Name + Status + Type + Time(s) + + + + + + + ${htmlescape.getText(current.attribute('message').value)} + + + N/A + +

+ + ${htmlescape.getText(current.value())} + + + + + + + + + + JUnit Test Results + + + +

+ + + + + + + + + + + + + + + + + + + + + +
TestsErrorsFailuresSuccess rateTime(s)
+ + + + + + + + + +
+

+ Note: + failures are anticipated and checked for with + assertions while + errors are unanticipated. +

+
+ +
+ + + + + + + + + + + + + + + + + + + + +
+ ${package} + + + + + + + + +
+

+ Note: package statistics are not computed recursively, they only + sum up all of its testsuites numbers. +

+ + + + + + + + + + + + + + + + + + +
+ ${test.attribute('name').value} + + + + + + + + +
+
+
+
+ +
+ + + + + + + + + + ## test can even not be started at all (failure to load the class) + ## so report the error directly + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
${testcase.attribute("name").value}FailureErrorSuccess + +
+ +
+ +
+
+
+
+ + + +
diff --git a/cactus/xdocs/goals.xml b/cactus/xdocs/goals.xml index f274ed17..b3629570 100644 --- a/cactus/xdocs/goals.xml +++ b/cactus/xdocs/goals.xml @@ -14,6 +14,21 @@ a cactus.home.[container name] property. + + cactus:report + + Generate an HTML report for the Cactus tests that been run. In order + to get this report as part of the generated web site, add the + following to your project.xml: + + [...] + maven-cactus-plugin + [...] + +]]> + + \ No newline at end of file diff --git a/cactus/xdocs/properties.xml b/cactus/xdocs/properties.xml index 9dfc90e4..40560015 100644 --- a/cactus/xdocs/properties.xml +++ b/cactus/xdocs/properties.xml @@ -52,7 +52,7 @@

Location where the plugins puts temporary build-generated - files. Default value is ${maven.build.dir}. + files. Default value is ${maven.build.dir}/cactus.

@@ -87,6 +87,28 @@

+ + cactus.junit.usefile + Yes + +

+ Decides whether the test result will be printed to the console or + not. Default value is false, meaning errors will be + displayed on the console. +

+ + + + cactus.reports.dir + Yes + +

+ Location of junit test reports for the Cactus tests. + Default value is + ${cactus.target.dir}/test-cactus-reports. +

+ +