[jbpm-commits] JBoss JBPM SVN: r5430 - in jbpm4/trunk: modules/test-cactus and 5 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Aug 5 16:14:06 EDT 2009


Author: tom.baeyens at jboss.com
Date: 2009-08-05 16:14:06 -0400 (Wed, 05 Aug 2009)
New Revision: 5430

Added:
   jbpm4/trunk/modules/test-cactus/src/main/webapp/index.html
   jbpm4/trunk/modules/test-cactus/src/test/resources/cactus.properties
Removed:
   jbpm4/trunk/modules/test-cactus/src/main/webapp/WEB-INF/classes/
Modified:
   jbpm4/trunk/modules/test-cactus/pom.xml
   jbpm4/trunk/modules/test-cactus/src/main/java/org/jbpm/cactustool/CactusTestGenerator.java
   jbpm4/trunk/modules/test-cactus/src/main/webapp/WEB-INF/web.xml
   jbpm4/trunk/modules/test-cactus/src/test/java/org/jbpm/test/AllIntegrationTests.java
   jbpm4/trunk/pom.xml
Log:
test-cactus module enhancements

Modified: jbpm4/trunk/modules/test-cactus/pom.xml
===================================================================
--- jbpm4/trunk/modules/test-cactus/pom.xml	2009-08-05 16:26:50 UTC (rev 5429)
+++ jbpm4/trunk/modules/test-cactus/pom.xml	2009-08-05 20:14:06 UTC (rev 5430)
@@ -17,7 +17,7 @@
 
   <name>jBPM 4 - Cactus</name>
   <groupId>org.jbpm.jbpm4</groupId>
-  <artifactId>jbpm-cactus</artifactId>
+  <artifactId>jbpm-test-cactus</artifactId>
   <packaging>war</packaging>
 
   <!-- Parent -->
@@ -33,25 +33,49 @@
     <dependency>
       <groupId>org.jbpm.jbpm4</groupId>
       <artifactId>jbpm-examples</artifactId>
-      <version>4.1-SNAPSHOT</version>
       <classifier>tests</classifier>
-      <scope>test</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>org.jbpm.jbpm4</groupId>
+          <artifactId>jbpm-api</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.jbpm.jbpm4</groupId>
+          <artifactId>jbpm-jpdl</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.subethamail</groupId>
+          <artifactId>subethasmtp-wiser</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.jbpm.jbpm4</groupId>
       <artifactId>jbpm-test-db</artifactId>
-      <version>4.1-SNAPSHOT</version>
       <classifier>tests</classifier>
-      <scope>test</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>org.jbpm.jbpm4</groupId>
+          <artifactId>jbpm-api</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.jbpm.jbpm4</groupId>
+          <artifactId>jbpm-jpdl</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.subethamail</groupId>
+          <artifactId>subethasmtp-wiser</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>cactus</groupId>
       <artifactId>cactus</artifactId>
-      <version>13-1.7.1</version>
     </dependency>
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
+      <scope>runtime</scope>
     </dependency>
   </dependencies>
 
@@ -73,14 +97,41 @@
                 <echo message="${test_classpath}" />
                 <java classname="org.jbpm.cactustool.CactusTestGenerator">
                   <classpath path="${test_classpath}"/>
-                  <arg line="src/test/java ../examples/src/test/java ../test-db/src/test/java" />
+                  <arg line="src/test/java ../examples/src/test/java" />
                 </java>
               </tasks>
             </configuration>
           </execution>
         </executions>
       </plugin>         
+      <plugin>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <includes>
+            <include>org/jbpm/test/AllIntegrationTests.java</include>
+          </includes>
+        </configuration>
+      </plugin>
+      
     </plugins>
   </build>
 
+  <profiles>
+    <profile>
+      <id>runtest</id>
+      <dependencies>
+        <dependency>
+          <groupId>org.jbpm.jbpm4</groupId>
+          <artifactId>jbpm-examples</artifactId>
+          <classifier>tests</classifier>
+        </dependency>
+        <dependency>
+          <groupId>org.jbpm.jbpm4</groupId>
+          <artifactId>jbpm-test-db</artifactId>
+          <classifier>tests</classifier>
+        </dependency>
+      </dependencies>
+    </profile>
+  </profiles>
+
 </project>

Modified: jbpm4/trunk/modules/test-cactus/src/main/java/org/jbpm/cactustool/CactusTestGenerator.java
===================================================================
--- jbpm4/trunk/modules/test-cactus/src/main/java/org/jbpm/cactustool/CactusTestGenerator.java	2009-08-05 16:26:50 UTC (rev 5429)
+++ jbpm4/trunk/modules/test-cactus/src/main/java/org/jbpm/cactustool/CactusTestGenerator.java	2009-08-05 20:14:06 UTC (rev 5430)
@@ -46,9 +46,10 @@
       out.println("package org.jbpm.test;");
       out.println();
       out.println("import junit.framework.Test;");
+      out.println("import junit.framework.TestCase;");
       out.println("import org.apache.cactus.ServletTestSuite;");
       out.println();
-      out.println("public class AllIntegrationTests {");
+      out.println("public class AllIntegrationTests extends TestCase {");
       out.println();
       out.println("  public static Test suite() {");
       out.println("    ServletTestSuite suite = new ServletTestSuite();");
@@ -71,9 +72,10 @@
 
   private static void scanForTestClasses(String dirPath, String packageName, PrintWriter out) throws Exception {
     File dirFile = new File(dirPath);
-    if (!dirFile.getName().startsWith(".")) {
-      log("scanning dir "+dirFile.getCanonicalPath());
+    if (".svn".equals(dirFile.getName())) {
+      return;
     }
+    log("scanning dir "+dirFile.getCanonicalPath());
     File[] dirContentFiles = dirFile.listFiles();
     if (dirContentFiles!=null) {
       for (File file : dirContentFiles) {

Modified: jbpm4/trunk/modules/test-cactus/src/main/webapp/WEB-INF/web.xml
===================================================================
--- jbpm4/trunk/modules/test-cactus/src/main/webapp/WEB-INF/web.xml	2009-08-05 16:26:50 UTC (rev 5429)
+++ jbpm4/trunk/modules/test-cactus/src/main/webapp/WEB-INF/web.xml	2009-08-05 20:14:06 UTC (rev 5430)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!DOCTYPE web-app
+    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+    "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
+
+<web-app>
+
+  <servlet>
+    <servlet-name>ServletRedirector</servlet-name>
+    <servlet-class>org.apache.cactus.server.ServletTestRedirector</servlet-class>
+  </servlet>
+
+  <servlet-mapping>
+    <servlet-name>ServletRedirector</servlet-name>
+    <url-pattern>/ServletRedirector</url-pattern>
+  </servlet-mapping>
+
+</web-app>

Added: jbpm4/trunk/modules/test-cactus/src/main/webapp/index.html
===================================================================
--- jbpm4/trunk/modules/test-cactus/src/main/webapp/index.html	                        (rev 0)
+++ jbpm4/trunk/modules/test-cactus/src/main/webapp/index.html	2009-08-05 20:14:06 UTC (rev 5430)
@@ -0,0 +1 @@
+hi
\ No newline at end of file


Property changes on: jbpm4/trunk/modules/test-cactus/src/main/webapp/index.html
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: jbpm4/trunk/modules/test-cactus/src/test/java/org/jbpm/test/AllIntegrationTests.java
===================================================================
--- jbpm4/trunk/modules/test-cactus/src/test/java/org/jbpm/test/AllIntegrationTests.java	2009-08-05 16:26:50 UTC (rev 5429)
+++ jbpm4/trunk/modules/test-cactus/src/test/java/org/jbpm/test/AllIntegrationTests.java	2009-08-05 20:14:06 UTC (rev 5430)
@@ -1,9 +1,10 @@
 package org.jbpm.test;
 
 import junit.framework.Test;
+import junit.framework.TestCase;
 import org.apache.cactus.ServletTestSuite;
 
-public class AllIntegrationTests {
+public class AllIntegrationTests extends TestCase {
 
   public static Test suite() {
     ServletTestSuite suite = new ServletTestSuite();
@@ -43,72 +44,6 @@
     suite.addTestSuite(org.jbpm.examples.timer.event.TimerEventTest.class);
     suite.addTestSuite(org.jbpm.examples.timer.repeat.TimerRepeatTest.class);
     suite.addTestSuite(org.jbpm.examples.timer.transition.TimerTransitionTest.class);
-    suite.addTestSuite(org.jbpm.examples.async.eventlistener.AsyncEventListenerTest.class);
-    suite.addTestSuite(org.jbpm.examples.goup.concurrency.GroupConcurrencyTest.class);
-    suite.addTestSuite(org.jbpm.examples.goup.multipleentries.MultipleEntriesTest.class);
-    suite.addTestSuite(org.jbpm.examples.goup.simple.GroupSimpleTest.class);
-    suite.addTestSuite(org.jbpm.examples.goup.timer.GroupTimerTest.class);
-    suite.addTestSuite(org.jbpm.test.activities.DecisionTest.class);
-    suite.addTestSuite(org.jbpm.test.activities.ForkJoinInSameTransactionTest.class);
-    suite.addTestSuite(org.jbpm.test.activities.ForkTest.class);
-    suite.addTestSuite(org.jbpm.test.activities.ForkToTaskTest.class);
-    suite.addTestSuite(org.jbpm.test.activities.GroupBasicsTest.class);
-    suite.addTestSuite(org.jbpm.test.activities.GroupTimersTest.class);
-    suite.addTestSuite(org.jbpm.test.activities.JoinTest.class);
-    suite.addTestSuite(org.jbpm.test.activities.StatesJoinEndTest.class);
-    suite.addTestSuite(org.jbpm.test.activities.StateTest.class);
-    suite.addTestSuite(org.jbpm.test.activities.SubProcessTest.class);
-    suite.addTestSuite(org.jbpm.test.activities.TasksJoinEndTest.class);
-    suite.addTestSuite(org.jbpm.test.async.AsyncBasicsTest.class);
-    suite.addTestSuite(org.jbpm.test.async.AsyncEndCombinationTest.class);
-    suite.addTestSuite(org.jbpm.test.async.AsyncEventListenerOnEndTest.class);
-    suite.addTestSuite(org.jbpm.test.auth.UserProvidedAuthenticationTest.class);
-    suite.addTestSuite(org.jbpm.test.cfg.ConfigurationTest.class);
-    suite.addTestSuite(org.jbpm.test.deploy.DeploymentQueryTest.class);
-    suite.addTestSuite(org.jbpm.test.deploy.ImageTest.class);
-    suite.addTestSuite(org.jbpm.test.deploy.SuspendDeploymentTest.class);
-    suite.addTestSuite(org.jbpm.test.eventlistener.EventListenerTest.class);
-    suite.addTestSuite(org.jbpm.test.eventlistener.HqlEventListenerTest.class);
-    suite.addTestSuite(org.jbpm.test.execution.ConcurrentEndTest.class);
-    suite.addTestSuite(org.jbpm.test.execution.ExecutionEagerLoadingTest.class);
-    suite.addTestSuite(org.jbpm.test.execution.ExecutionQueryTest.class);
-    suite.addTestSuite(org.jbpm.test.execution.FindExecutionTest.class);
-    suite.addTestSuite(org.jbpm.test.execution.SignalExecutionTest.class);
-    suite.addTestSuite(org.jbpm.test.execution.StartExecutionTest.class);
-    suite.addTestSuite(org.jbpm.test.execution.SystemVariablesTest.class);
-    suite.addTestSuite(org.jbpm.test.history.AvgDurationTest.class);
-    suite.addTestSuite(org.jbpm.test.history.ChoiceDistributionTest.class);
-    suite.addTestSuite(org.jbpm.test.history.EndProcessInstanceTest.class);
-    suite.addTestSuite(org.jbpm.test.history.HistoryActivityInstanceQeuryTest.class);
-    suite.addTestSuite(org.jbpm.test.history.HistoryDetailQueryTest.class);
-    suite.addTestSuite(org.jbpm.test.history.HistoryTaskAssigneeTest.class);
-    suite.addTestSuite(org.jbpm.test.history.ProcessInstanceHistoryTest.class);
-    suite.addTestSuite(org.jbpm.test.identity.IdentityTest.class);
-    suite.addTestSuite(org.jbpm.test.mgmt.JobQueryTest.class);
-    suite.addTestSuite(org.jbpm.test.process.ActivityCoordinatesTest.class);
-    suite.addTestSuite(org.jbpm.test.process.DeploymentResourcesTest.class);
-    suite.addTestSuite(org.jbpm.test.process.DescriptionTest.class);
-    suite.addTestSuite(org.jbpm.test.process.ProcessDefinitionQueryTest.class);
-    suite.addTestSuite(org.jbpm.test.process.ProcessDefinitionStartFormTest.class);
-    suite.addTestSuite(org.jbpm.test.process.RepositoryServiceTest.class);
-    suite.addTestSuite(org.jbpm.test.reporting.SQLStmtTest.class);
-    suite.addTestSuite(org.jbpm.test.task.SubTaskTest.class);
-    suite.addTestSuite(org.jbpm.test.task.TaskCommentsTest.class);
-    suite.addTestSuite(org.jbpm.test.task.TaskCreateUpdateDeleteTest.class);
-    suite.addTestSuite(org.jbpm.test.task.TaskListTest.class);
-    suite.addTestSuite(org.jbpm.test.task.TaskParticipationsTest.class);
-    suite.addTestSuite(org.jbpm.test.task.TaskPropertiesTest.class);
-    suite.addTestSuite(org.jbpm.test.task.TaskQueryCandidatesTest.class);
-    suite.addTestSuite(org.jbpm.test.task.TaskQueryProcessTest.class);
-    suite.addTestSuite(org.jbpm.test.task.TaskQueryTest.class);
-    suite.addTestSuite(org.jbpm.test.task.TaskVariablesTest.class);
-    suite.addTestSuite(org.jbpm.test.taskactivity.TaskCandidatesTest.class);
-    suite.addTestSuite(org.jbpm.test.taskactivity.TaskCompletionTest.class);
-    suite.addTestSuite(org.jbpm.test.taskactivity.TaskOutcomesTest.class);
-    suite.addTestSuite(org.jbpm.test.taskactivity.TaskReassignTest.class);
-    suite.addTestSuite(org.jbpm.test.timer.TimerTest.class);
-    suite.addTestSuite(org.jbpm.test.variables.BasicVariablesTest.class);
-    suite.addTestSuite(org.jbpm.test.variables.VariableBasicTypesTest.class);
     return suite;
   }
 }

Added: jbpm4/trunk/modules/test-cactus/src/test/resources/cactus.properties
===================================================================
--- jbpm4/trunk/modules/test-cactus/src/test/resources/cactus.properties	                        (rev 0)
+++ jbpm4/trunk/modules/test-cactus/src/test/resources/cactus.properties	2009-08-05 20:14:06 UTC (rev 5430)
@@ -0,0 +1 @@
+cactus.contextURL=http://localhost:8080/jbpm-test-cactus


Property changes on: jbpm4/trunk/modules/test-cactus/src/test/resources/cactus.properties
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: jbpm4/trunk/pom.xml
===================================================================
--- jbpm4/trunk/pom.xml	2009-08-05 16:26:50 UTC (rev 5429)
+++ jbpm4/trunk/pom.xml	2009-08-05 20:14:06 UTC (rev 5430)
@@ -99,6 +99,7 @@
       <dependency>
         <groupId>org.jbpm.jbpm4</groupId>
         <artifactId>jbpm-examples</artifactId>
+        <classifier>tests</classifier>
         <version>${version}</version>
       </dependency>
       <dependency>
@@ -125,6 +126,7 @@
         <groupId>org.jbpm.jbpm4</groupId>
         <artifactId>jbpm-test-db</artifactId>
         <version>${version}</version>
+        <classifier>tests</classifier>
       </dependency>
       <dependency>
         <groupId>org.jbpm.jbpm4</groupId>



More information about the jbpm-commits mailing list