You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by sm...@apache.org on 2022/01/17 16:02:23 UTC

[directory-fortress-core] branch jmeter-plugin-upgrade updated: jmeter tests now working with latest plugin. Alter the doc to match

This is an automated email from the ASF dual-hosted git repository.

smckinney pushed a commit to branch jmeter-plugin-upgrade
in repository https://gitbox.apache.org/repos/asf/directory-fortress-core.git


The following commit(s) were added to refs/heads/jmeter-plugin-upgrade by this push:
     new a9de390  jmeter tests now working with latest plugin.  Alter the doc to match
a9de390 is described below

commit a9de39096a98f6f48fe2d3811eb1e6cd250aa5b3
Author: Shawn McKinney <sm...@symas.com>
AuthorDate: Mon Jan 17 10:02:18 2022 -0600

    jmeter tests now working with latest plugin.  Alter the doc to match
---
 README-LOAD-TESTING.md |  20 ++++-----
 pom.xml                | 120 ++++++++++++++++++++++++-------------------------
 2 files changed, 68 insertions(+), 72 deletions(-)

diff --git a/README-LOAD-TESTING.md b/README-LOAD-TESTING.md
index 31ecc2d..89a2294 100644
--- a/README-LOAD-TESTING.md
+++ b/README-LOAD-TESTING.md
@@ -82,7 +82,7 @@ ________________________________________________________________________________
  Will add user entry.  Optionally will perform an update and/or role assignment.
  
   ```
-  mvn -Ploadtest jmeter:jmeter -Dtype=ftAddUser -Dqualifier=A1 -Dverify=true -Dsleep=30 -Dupdate=true -Dou=loadtestu -Drole=jmeterrole
+  mvn verify -Dtype=ftAddUser -Dqualifier=A1 -Dverify=true -Dsleep=30 -Dupdate=true -Dou=loadtestu -Drole=jmeterrole
   ```
 
   This test adds users.  It uses runtime arguments to define behavior:
@@ -99,7 +99,7 @@ ________________________________________________________________________________
  B. Delete Users:
  
   ```
-  mvn -Ploadtest jmeter:jmeter -Dtype=ftDelUser -Dqualifier=A1 -Dverify=true -Dsleep=30
+  mvn verify -Dtype=ftDelUser -Dqualifier=A1 -Dverify=true -Dsleep=30
   ```
 
   * Same properties as add except for 'ou', which is not used for delete ops
@@ -109,7 +109,7 @@ ________________________________________________________________________________
  Will perform a createSession.  Optionally reads the entry and/or permission checks.
  
   ```
-  mvn -Ploadtest jmeter:jmeter -Dtype=ftCheckUser -Dqualifier=A1 -Dverify=true -Dsize=20 -Dperm=jmeterobject.oper
+  mvn verify -Dtype=ftCheckUser -Dqualifier=A1 -Dverify=true -Dsize=20 -Dperm=jmeterobject.oper
   ```
 
   This test performs createSession on users.  It uses runtime arguments to define behavior:
@@ -123,7 +123,7 @@ A. Qualifier property.
 The add test generates userids based on: hostname + qualifier + counter.  The counter is global across all threads, so if you enable 20 threads * 100 loops, with a qualifier = 'A1', 2,000 users will be added:
 
   ```
-  mvn -Ploadtest jmeter:jmeter -Dtype=ftAddUser -Dqualifier=A1
+  mvn verify -Dtype=ftAddUser -Dqualifier=A1
   ```
 
 hostname-A1-1
@@ -135,13 +135,13 @@ hostname-A1-1000
 If you run the test a second time (before a delete run) there will be duplicates because it tries to add users with same userids again.  This is the idea of the 'qualifier'.  Change its value to ensure the uids remain unique across test runs.
 
   ```
-  mvn -Ploadtest jmeter:jmeter -Dtype=ftAddUser -Dqualifier=A2
+  mvn verify -Dtype=ftAddUser -Dqualifier=A2
   ```
 
 Or, you can run a delete before the next add:
 
   ```
-  mvn -Ploadtest jmeter:jmeter -Dtype=ftDelUser -Dqualifier=A1
+  mvn verify -Dtype=ftDelUser -Dqualifier=A1
   ```
 
 Just make sure the thread and loop counts in ftDelUser.jmx are the same as ftAddUser.jmx
@@ -151,7 +151,7 @@ B. Verify
 If set to true, after every operation, a read of the entry will be performed.
 
   ```
-  mvn -Ploadtest jmeter:jmeter -Dtype=ftAddUser -Dqualifier=A1 -Dverify=true
+  mvn verify -Dtype=ftAddUser -Dqualifier=A1 -Dverify=true
   ```
 
 C. Update
@@ -159,7 +159,7 @@ C. Update
 If set to true, after every add, an update will be performed on user's description field.
 
   ```
-  mvn -Ploadtest jmeter:jmeter -Dtype=ftAddUser -Dqualifier=A1 -Dupdate=true
+  mvn verify -Dtype=ftAddUser -Dqualifier=A1 -Dupdate=true
   ```
 
 D. Role
@@ -167,7 +167,7 @@ D. Role
 If 'role' set as property, it will be assigned after the user has been added.  The role itself must already exist before being used in assignment to user.
 
   ```
-  mvn -Ploadtest jmeter:jmeter -Dtype=ftAddUser -Dqualifier=A1 -Drole=jmeterrole
+  mvn verify -Dtype=ftAddUser -Dqualifier=A1 -Drole=jmeterrole
   ```
 
 E. Perm
@@ -175,7 +175,7 @@ E. Perm
 This applies only to the CheckUser test.  If set, it will be used as permission in checkAccess call 10 times.  For example:
 
   ```
-  mvn -Ploadtest jmeter:jmeter -Dtype=ftCheckUser -Dperm=jmeterobject.oper
+  mvn verify -Dtype=ftCheckUser -Dperm=jmeterobject.oper
   ```
 
   Will call checkAccess:
diff --git a/pom.xml b/pom.xml
index ee53f81..e4cebcf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -111,7 +111,7 @@
     <version.log4j>2.17.1</version.log4j>
     <version.opencsv>2.3</version.opencsv>
     <version.jackson-annotations>2.12.3</version.jackson-annotations>
-    <version.jmeter.plugin>1.10.1</version.jmeter.plugin>
+    <version.jmeter.plugin>3.5.0</version.jmeter.plugin>
     <commons-pool2.version>2.9.0</commons-pool2.version>
 
     <!-- ===================================================== -->
@@ -574,7 +574,6 @@
               <suppressionFile>${project.basedir}/src/owasp/suppression.xml</suppressionFile>
           </configuration>
         </plugin>
-
       </plugins>
     </pluginManagement>
 
@@ -706,6 +705,63 @@
 
         </executions>
       </plugin>
+
+      <!-- To execute: mvn verify jmeter:jmeter -Dtype=testname [-Dmore=args] -->
+      <plugin>
+        <groupId>com.lazerycode.jmeter</groupId>
+        <artifactId>jmeter-maven-plugin</artifactId>
+        <version>${version.jmeter.plugin}</version>
+        <configuration>
+          <testPlanLibraries>
+            <artifact>org.apache.directory.fortress:fortress-core:${project.version}</artifact>
+            <artifact>org.apache.directory.fortress:fortress-core:jar:tests:${project.version}</artifact>
+            <artifact>org.apache.commons:commons-pool2:${commons-pool2.version}</artifact>
+          </testPlanLibraries>
+          <suppressJMeterOutput>false</suppressJMeterOutput>
+          <testFilesIncluded>
+            <jMeterTestFile>${type}.jmx</jMeterTestFile>
+          </testFilesIncluded>
+          <propertiesSystem>
+            <version>${project.version}</version>
+            <tenant>${tenant}</tenant>
+            <hostname>${hostname}</hostname>
+            <qualifier>${qualifier}</qualifier>
+            <verify>${verify}</verify>
+            <output>${output}</output>
+            <sleep>${sleep}</sleep>
+            <size>${size}</size>
+            <perm>${perm}</perm>
+            <ou>${ou}</ou>
+          </propertiesSystem>
+          <jMeterProcessJVMSettings>
+            <xms>1024</xms>
+            <xmx>1024</xmx>
+          </jMeterProcessJVMSettings>
+        </configuration>
+        <executions>
+          <execution>
+            <id>configuration</id>
+            <phase>pre-integration-test</phase>
+            <goals>
+              <goal>configure</goal>
+            </goals>
+          </execution>
+          <!-- Run JMeter tests -->
+          <execution>
+            <id>jmeter-tests</id>
+            <goals>
+              <goal>jmeter</goal>
+            </goals>
+          </execution>
+          <!-- Fail build on errors in test -->
+          <execution>
+            <id>jmeter-check-results</id>
+            <goals>
+              <goal>results</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
 
     <testResources>
@@ -806,66 +862,6 @@
       </build>
     </profile>
 
-    <!-- To execute: mvn -Ploadtest jmeter:jmeter -Dtype=testname -->
-    <profile>
-      <id>loadtest</id>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>com.lazerycode.jmeter</groupId>
-            <artifactId>jmeter-maven-plugin</artifactId>
-            <!--            <version>${version.jmeter.plugin}</version>-->
-            <version>3.5.0</version>
-            <configuration>
-              <suppressJMeterOutput>false</suppressJMeterOutput>
-              <testFilesIncluded>
-                <jMeterTestFile>${type}.jmx</jMeterTestFile>
-              </testFilesIncluded>
-              <propertiesSystem>
-                <version>${project.version}</version>
-                <tenant>${tenant}</tenant>
-                <hostname>${hostname}</hostname>
-                <qualifier>${qualifier}</qualifier>
-                <verify>${verify}</verify>
-                <output>${output}</output>
-                <sleep>${sleep}</sleep>
-                <size>${size}</size>
-                <perm>${perm}</perm>
-                <ou>${ou}</ou>
-              </propertiesSystem>
-              <testPlanLibraries>
-                <artifact>org.apache.directory.fortress:fortress-core:${project.version}</artifact>
-                <artifact>org.apache.directory.fortress:fortress-core:jar:tests:${project.version}</artifact>
-                <artifact>org.apache.commons:commons-pool2:${commons-pool2.version}</artifact>
-              </testPlanLibraries>
-            </configuration>
-            <executions>
-              <execution>
-                <id>configuration</id>
-                <goals>
-                  <goal>configure</goal>
-                </goals>
-              </execution>
-              <execution>
-                <id>jmeter-tests</id>
-                <goals>
-                  <goal>jmeter</goal>
-                </goals>
-              </execution>
-              <!-- Fail build on errors in test -->
-              <execution>
-                <id>jmeter-check-results</id>
-                <goals>
-                  <goal>results</goal>
-                </goals>
-              </execution>
-            </executions>
-          </plugin>
-
-        </plugins>
-      </build>
-    </profile>
-
     <!-- This profile calls ant target init-slapd in build-config.xml script. -->
     <!-- To execute: mvn -Pinit-slapd test -->
     <profile>