directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r421466 - in /directory/sandbox/oersoy/ads.performance.testing/src: main/resources/META-INF/maven/archetype.xml site/apt/documentation.apt
Date Thu, 13 Jul 2006 00:05:02 GMT
Author: akarasulu
Date: Wed Jul 12 17:05:01 2006
New Revision: 421466

URL: http://svn.apache.org/viewvc?rev=421466&view=rev
Log:
applying oles patch from DIR-188

Modified:
    directory/sandbox/oersoy/ads.performance.testing/src/main/resources/META-INF/maven/archetype.xml
    directory/sandbox/oersoy/ads.performance.testing/src/site/apt/documentation.apt

Modified: directory/sandbox/oersoy/ads.performance.testing/src/main/resources/META-INF/maven/archetype.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/ads.performance.testing/src/main/resources/META-INF/maven/archetype.xml?rev=421466&r1=421465&r2=421466&view=diff
==============================================================================
--- directory/sandbox/oersoy/ads.performance.testing/src/main/resources/META-INF/maven/archetype.xml
(original)
+++ directory/sandbox/oersoy/ads.performance.testing/src/main/resources/META-INF/maven/archetype.xml
Wed Jul 12 17:05:01 2006
@@ -1,10 +0,0 @@
-<archetype>
-  <id>ads.performance.testing</id>
-	<testSources>
-   		<testSource>src/test/java/ADSPerformanceTest.java</testSource>
-   	</testSources>
-  <resources>
-    <resource>inputs/configuration/server.xml</resource>
-    <resource>inputs/ldif/performance.ldif</resource>
-  </resources>
-</archetype>

Modified: directory/sandbox/oersoy/ads.performance.testing/src/site/apt/documentation.apt
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/ads.performance.testing/src/site/apt/documentation.apt?rev=421466&r1=421465&r2=421466&view=diff
==============================================================================
--- directory/sandbox/oersoy/ads.performance.testing/src/site/apt/documentation.apt (original)
+++ directory/sandbox/oersoy/ads.performance.testing/src/site/apt/documentation.apt Wed Jul
12 17:05:01 2006
@@ -62,7 +62,7 @@
      Modify it so that in contains the baseline testing setup 
      and tests for ADS.
      
-* Edit src/main/resources/META-INF/maven/archetype.xml
+* Edit src/main/resources/META-INF/archetype.xml
  
      The archetype.xml file tells maven which resources to include
      when creating projects of this type.
@@ -125,3 +125,137 @@
      mvn eclipse:eclipse
      
      Now just import using eclipse's File > Import
+
+* Next Steps
+
+** Update the dependencies on the ads.performance.archetype testing
+
+     Add the ADS api project dependencies to the dependencies list of the performance.testing.archetype
pom.
+     
+     This is so the unit tests can access the API.
+
+** Create one or more baseline LDIF file(s)
+
+    The performance.ldif file in the input directory is currently empty.
+    One or more of these files should be created, such that the unit
+    tests can run them.
+    
+    We were also discussing creating a mojo that can generate these files, or
+    using SLAMD.  It would be great to have a mojo that just wrapped SLAMD,
+    that way the we can just create another input directory for the file
+    SLAMD uses to generate the LDIF files, and this would automatically
+    be run during the generate sources phase of the maven lifecycle.
+
+** Create the ADS Testing Setup
+    
+    The following setup should be done in the public void SetUp() method of each unit test
contained in the peformance.testing.archetype archetype.
+
+    * Create an instance of the server.xml configuration contained in the archetype input
directory
+    * Create an instance of ADS.
+    * Configure the ADS instance with the server.xml instance.
+    * Configure the ADS instance with the server.xml instance.
+    * Run each unit test with the configured ADS instance.
+
+** Write the ADS Unit Tests
+
+   I think there are unit tests already, so now we just need to sanitize them so that they
provide a suitable
+   starting point, and put them in the archetype's unit testing directory, along with ADSPerformanceTest.java,

+   which is currently just the default test that comes with any generic maven project.
+
+** SLAMD LDIF Generation mojo Command
+
+     The command below will create a baseline for the ldif generation mojo:
+     
+     mvn archetype:create -DgroupId=org.apache.ads.peformance.testing.ldif.generation.mojo
-DartifactId=ldif.generation.mojo -DarchetypeArtifactId=maven-archetype-mojo
+
+** Completing the Mojo
+
+    The mojo needs to perform the following activities (This is rough):
+    
+    * Read the configuration file for generating the ldif files (Delegate to SLAMD)
+    
+    * Generate the files (Delegate to SLAMD)
+
+
+*** Creating another directory for the SLAMD configuration file(s)
+
+    Please see the general instructions for creating the performance testing archetype.
+    
+    For now we'll assume we have the directory inputs/slamd/configuration
+    available, and that it contains a baseline configuration file for generating ldif file(s)
+    called "slamd.cfg".
+
+*** Specify the location of the SLAMD configuration files in the mojo
+
+-----------------------------------------------------------------
+    private static final String SLAMD_CONFIGURATION_FILE_LOCATION = "inputs/slamd/slamd.cfg";
+    private static final String SLAMD_GENERATION_OUTPUT_DIRECTORY = "inputs/ldif/;
+-----------------------------------------------------------------
+
+*** Binding the Mojo to the maven lifecycle in the performance.testing.archetype archetype
 
+
+    The ldif.generation.mojo now needs to be bound to the maven lifecycle's generate source
phase.
+    
+    This is done in the code of the mojo:
+    
+-----------------------------------------------------------------------------------------------------------
+    
+    /**
+     * @goal generate
+     * @phase generate-sources
+     * @description Generates the ldif file(s) and puts them in the ldif input directory
+     */
+-----------------------------------------------------------------------------------------------------------
+    
+** Updating the pom of the performance.testing.archetype archetype  
+
+    Open the src/main/resources/archetype-resources/pom.xml and add the following build section
right under the dependencies section
+    (I think ADS is using JDK 1.5, so I added that to the configuration of the compiler plugin
- this should be set to the 
+    version of the JDK used):
+    
+---------------------------------------------------------------------------------------------------------
+      <build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<configuration>
+					<source>1.5</source>
+					<target>1.5</target>
+				</configuration>
+			</plugin>
+			<plugin>
+                <groupId>org.apache.ads.peformance.testing.ldif.generation.mojo</groupId>
+                <artifactId>ldif.generation.mojo</artifactId>
+                <version>1.0-SNAPSHOT</version>
+                <executions>
+                    <execution>
+                        <id>generate</id>
+                        <goals>
+                        	<goal>generate</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+		</plugins>
+	</build>
+---------------------------------------------------------------------------------------------------------
+     
+* Testing the Mojo with the performance testing archetype
+
+    The process is the same as before.  We do:
+    
+    mvn archetype:create -DarchetypeVersion=1.0-SNAPSHOT -DarchetypeGroupId=org.apache.ads.archetypes
-DgroupId=mavenComplainsIfWeDontGiveOneButWeDontNeedOne -DarchetypeArtifactId=ads.performance.testing
-DartifactId=ads.sample.performance.testing 
+    
+    However, now before we run tests the mojo will create the ldif files for us.
+    
+    Thus the file names that the mojo creates, must be used in the setup of the 
+    tests.
+    
+    This would make it attractive to perhaps create multiple archetypes for 
+    specific tests, that are just slight variations of eachother.
+    
+    That way we don't need to change too much stuff in the setup section 
+    of each testing project.
+    
+    
\ No newline at end of file



Mime
View raw message