You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by vm...@apache.org on 2004/06/10 08:28:10 UTC
cvs commit: maven-plugins-sandbox/abbot plugin.properties
vmassol 2004/06/09 23:28:10
Modified: abbot/xdocs properties.xml
abbot/src/main/org/apache/maven/abbot
AbbotWebstartTestRunner.java
abbot plugin.properties
Log:
Added new maven.abbot.suite.name property to let the user name a test suite (which as a consequence generates a test report file with that name instead of the generic AbbotTestAll name)
Revision Changes Path
1.2 +7 -0 maven-plugins-sandbox/abbot/xdocs/properties.xml
Index: properties.xml
===================================================================
RCS file: /home/cvs/maven-plugins-sandbox/abbot/xdocs/properties.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- properties.xml 30 Apr 2004 19:06:13 -0000 1.1
+++ properties.xml 10 Jun 2004 06:28:10 -0000 1.2
@@ -37,6 +37,13 @@
maven.abbot.format = ${maven.junit.format}
maven.abbot.usefile = ${maven.junit.usefile}
+# (optional) Name of the test suite beeing executed. This name will be used
+# to name the generated JUnit test report. If not specified the report name
+# will be TEST-org.apache.maven.abbot.AbbotTestAll. This is useful when
+# you're calling the Abbot plugin several times in a row as otherwise the
+# reports will overwrite each other.
+#maven.abbot.suite.name = MyTestSuite
+
# -------------------------------------------------------------------
# Properties required only for the abbot:test goal
# -------------------------------------------------------------------
1.2 +18 -2 maven-plugins-sandbox/abbot/src/main/org/apache/maven/abbot/AbbotWebstartTestRunner.java
Index: AbbotWebstartTestRunner.java
===================================================================
RCS file: /home/cvs/maven-plugins-sandbox/abbot/src/main/org/apache/maven/abbot/AbbotWebstartTestRunner.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AbbotWebstartTestRunner.java 30 Apr 2004 19:06:12 -0000 1.1
+++ AbbotWebstartTestRunner.java 10 Jun 2004 06:28:10 -0000 1.2
@@ -45,6 +45,15 @@
*/
private static final String REPORT_DIR =
System.getProperty("maven.abbot.reports.dir", "");
+
+ /**
+ * Name given by the user to the suite of tests being executed. The Abbot
+ * test report will be name after the content of this property. This is
+ * useful when you're calling the Abbot plugin several times in a row as
+ * otherwise the reports will overwrite each other.
+ */
+ private static final String TESTSUITE_NAME =
+ System.getProperty("maven.abbot.suite.name");
/**
* Entry point for starting the Ant JUnit test runner which will start
@@ -116,7 +125,14 @@
// Add tests to run
JUnitTest test = new JUnitTest(testName);
test.setTodir(new File(reportDir));
- junit.addTest(test);
+
+ // Sets the name of the report file is the user has specified a name.
+ // Otherwise the name of the AbbotTestAll class will be used.
+ if (TESTSUITE_NAME != null)
+ {
+ test.setOutfile(TESTSUITE_NAME);
+ }
+ junit.addTest(test);
// Other settings
junit.setHaltonerror(true);
1.2 +7 -0 maven-plugins-sandbox/abbot/plugin.properties
Index: plugin.properties
===================================================================
RCS file: /home/cvs/maven-plugins-sandbox/abbot/plugin.properties,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- plugin.properties 30 Apr 2004 19:05:44 -0000 1.1
+++ plugin.properties 10 Jun 2004 06:28:10 -0000 1.2
@@ -43,6 +43,13 @@
maven.abbot.format = ${maven.junit.format}
maven.abbot.usefile = ${maven.junit.usefile}
+# (optional) Name of the test suite beeing executed. This name will be used
+# to name the generated JUnit test report. If not specified the report name
+# will be TEST-org.apache.maven.abbot.AbbotTestAll. This is useful when
+# you're calling the Abbot plugin several times in a row as otherwise the
+# reports will overwrite each other.
+#maven.abbot.suite.name = MyTestSuite
+
# -------------------------------------------------------------------
# Properties required only for the abbot:test goal
# -------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org