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/11/15 13:04:12 UTC

[directory-fortress-core] branch master updated: + typical deployment section. Formatting and other minor corrections

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 5de56301 + typical deployment section. Formatting and other minor corrections
5de56301 is described below

commit 5de563010bdfa77cc0c416991a714e255aebc8a4
Author: Shawn McKinney <sm...@symas.com>
AuthorDate: Tue Nov 15 07:04:06 2022 -0600

    + typical deployment section. Formatting and other minor corrections
---
 README-LOAD-TESTING.md | 164 ++++++++++++++++++++++++++++++-------------------
 1 file changed, 100 insertions(+), 64 deletions(-)

diff --git a/README-LOAD-TESTING.md b/README-LOAD-TESTING.md
index c45b7e94..7cde55e7 100644
--- a/README-LOAD-TESTING.md
+++ b/README-LOAD-TESTING.md
@@ -18,26 +18,53 @@
 
 # README-LOAD-TESTING
 
-Contains instructions to load test Apache Fortress using maven jmeter plugin.
-
+Contains instructions to load test Apache Fortress using the Apache Maven Jmeter plugin.
 ___________________________________________________________________________________
 ## Table of Contents
 
- 1. Load the security policy
- 2. Find the .jmx files
- 3. Setting the jmeter parameters
- 4. Run the tests
- 5. Understanding the tests
- 6. Troubleshooting
+ 1. Typical deployment
+ 2. Load the security policy
+ 3. Find the .jmx files
+ 4. Setting the jmeter parameters
+ 5. Run the tests
+ 6. Understanding the tests
+ 7. Troubleshooting
 
 ___________________________________________________________________________________
-### 1. Load the security policy
+### 1. Typical deployment
+
+```
+            .--------------.      
+            |     Maven    |      
+            '-------.------'      
+                    | in-process
+            .-------'-------.
+            | Jmeter plugin |
+            '-------.-------'
+                    | in-process
+            .-------'------.
+            | FortressCore |
+            '-------.------'
+                    | LDAPS
+          .---------'-------.
+          | DirectoryServer |
+          '-----------------'
+```
+
+ Uses the ```mvn verify``` command to invoke maven jmeter plugin which then executes jmeter tests running various fortress core test cases. 
+___________________________________________________________________________________
+### 2. Load the security policy
 
  ```
  mvn install -Dload.file=./ldap/setup/JmeterTestPolicy.xml
  ```
 
-### 2. Find the .jmx files
+ Loads a test security policy used in the subsequent jmeter test cases. For example, the test users may be assigned a particular role that's provisioned here.
+
+___________________________________________________________________________________
+### 3. Find the .jmx files
+
+- These metadata files contain parameters that correspond with each test case.
 
  A. Add User:
   [src/test/jmeter/ftAddUser.jmx](src/test/jmeter/ftAddUser.jmx)
@@ -48,7 +75,8 @@ ________________________________________________________________________________
  C. Check User:
   [src/test/jmeter/ftCheckUser.jmx](src/test/jmeter/ftCheckUser.jmx)
 
-### 3. Setting the jmeter parameters
+___________________________________________________________________________________
+### 4. Setting the jmeter parameters
 
  These settings affect the length, duration, and the number of threads:
 
@@ -58,22 +86,23 @@ ________________________________________________________________________________
  * **ThreadGroup.ramp_time**: integer value, number of seconds for starting threads.  A rule of thumb, set to same as num_threads.
 
  For example:
- ```
- <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Fortress CreateSession" enabled="true">
-     ...
-     <elementProp name="ThreadGroup.main_controller" ...>
-         <boolProp name="LoopController.continue_forever">false</boolProp>
-         <stringProp name="LoopController.loops">1000</stringProp>
-     </elementProp>
-     <stringProp name="ThreadGroup.num_threads">10</stringProp>
-     <stringProp name="ThreadGroup.ramp_time">10</stringProp>
-     ...
- </ThreadGroup>
- ```
+```jmx
+<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Fortress CreateSession" enabled="true">
+    ...
+    <elementProp name="ThreadGroup.main_controller" ...>
+        <boolProp name="LoopController.continue_forever">false</boolProp>
+        <stringProp name="LoopController.loops">1000</stringProp>
+    </elementProp>
+    <stringProp name="ThreadGroup.num_threads">10</stringProp>
+    <stringProp name="ThreadGroup.ramp_time">10</stringProp>
+    ...
+</ThreadGroup>
+```
 
  This test will start ten threads in ten seconds.  Each thread executes the *createSession* function 1000 times before terminating.
 
-### 4. Run the tests
+___________________________________________________________________________________
+### 5. Run the tests
 
  From **FORTRESS_HOME** folder, enter the following command from a system prompt:
 
@@ -81,9 +110,9 @@ ________________________________________________________________________________
  
  Will add user entry.  Optionally will perform an update and/or role assignment.
  
-  ```
-  mvn verify -Ploadtest -Dtype=ftAddUser -Dqualifier=A1 -Dverify=true -Dsleep=30 -Dupdate=true -Dou=loadtestu -Drole=jmeterrole
-  ```
+```bash
+mvn verify -Ploadtest -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:
    * hostname=foo     <-- optional field useful for distributing the load across servers in a multi-master env, it will override what's in fortress.properties 
@@ -97,86 +126,89 @@ ________________________________________________________________________________
   * All but hostname may also be set as properties in [add config](src/test/jmeter/ftAddUser.jmx) or [del config](src/test/jmeter/ftDelUser.jmx) files.
 
  B. Delete Users:
- 
-  ```
-  mvn verify -Ploadtest -Dtype=ftDelUser -Dqualifier=A1 -Dverify=true -Dsleep=30
-  ```
+
+```bash
+mvn verify -Ploadtest -Dtype=ftDelUser -Dqualifier=A1 -Dverify=true -Dsleep=30
+```
 
   * Same properties as add except for 'ou', which is not used for delete ops
 
  C. Check Users:
  
  Will perform a createSession.  Optionally reads the entry and/or permission checks.
- 
-  ```
-  mvn verify -Ploadtest -Dtype=ftCheckUser -Dqualifier=A1 -Dverify=true -Dsize=20 -Dperm=jmeterobject.oper
-  ```
+
+```bash
+mvn verify -Ploadtest -Dtype=ftCheckUser -Dqualifier=A1 -Dverify=true -Dsize=20 -Dperm=jmeterobject.oper
+```
 
   This test performs createSession on users.  It uses runtime arguments to define behavior:
    * size=20                  <-- defines the number of users in the test set
    * Dperm=jmeterobject.oper  <-- this is an optional property, will perform permission checks if set
 
-### 5. Understanding the tests
+___________________________________________________________________________________
+### 6. Understanding the tests
 
 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 verify -Ploadtest -Dtype=ftAddUser -Dqualifier=A1
-  ```
+```bash
+mvn verify -Ploadtest -Dtype=ftAddUser -Dqualifier=A1
+```
 
+```
 hostname-A1-1
 hostname-A1-2
 hostname-A1-3
 ...
 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.
+ 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 verify -Ploadtest -Dtype=ftAddUser -Dqualifier=A2
-  ```
+```bash
+mvn verify -Ploadtest -Dtype=ftAddUser -Dqualifier=A2
+```
 
-Or, you can run a delete before the next add:
+ Or, you can run a delete before the next add:
 
-  ```
-  mvn verify -Ploadtest -Dtype=ftDelUser -Dqualifier=A1
-  ```
+```bash
+mvn verify -Ploadtest -Dtype=ftDelUser -Dqualifier=A1
+```
 
-Just make sure the thread and loop counts in ftDelUser.jmx are the same as ftAddUser.jmx
+ Just make sure the thread and loop counts in ftDelUser.jmx are the same as ftAddUser.jmx
 
 B. Verify
 
-If set to true, after every operation, a read of the entry will be performed.
+ If set to true, after every operation, a read of the entry will be performed.
 
-  ```
-  mvn verify -Ploadtest -Dtype=ftAddUser -Dqualifier=A1 -Dverify=true
-  ```
+```bash
+mvn verify -Ploadtest -Dtype=ftAddUser -Dqualifier=A1 -Dverify=true
+```
 
 C. Update
 
 If set to true, after every add, an update will be performed on user's description field.
 
-  ```
-  mvn verify -Ploadtest -Dtype=ftAddUser -Dqualifier=A1 -Dupdate=true
-  ```
+```bash
+mvn verify -Ploadtest -Dtype=ftAddUser -Dqualifier=A1 -Dupdate=true
+```
 
 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 verify -Ploadtest -Dtype=ftAddUser -Dqualifier=A1 -Drole=jmeterrole
-  ```
+```bash
+mvn verify -Ploadtest -Dtype=ftAddUser -Dqualifier=A1 -Drole=jmeterrole
+```
 
 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 verify -Ploadtest -Dtype=ftCheckUser -Dperm=jmeterobject.oper
-  ```
+```bash
+mvn verify -Ploadtest -Dtype=ftCheckUser -Dperm=jmeterobject.oper
+```
 
   Will call checkAccess:
   
@@ -188,9 +220,13 @@ This applies only to the CheckUser test.  If set, it will be used as permission
   
 These assignments must already exist before running this test.  
 
-### 6. Troubleshooting
+___________________________________________________________________________________
+### 7. Troubleshooting
+
+- The first place to look is the standard out.
+- These files listed below contain additional info.
 
-A. View the results
+- A. View the results
 
 * target/jmeter/results/[DATE]-ftAddUser.jtl
 * target/jmeter/results/[DATE]ftDelUser.jmx.jtl
@@ -203,4 +239,4 @@ B. View the logs
 * target/jmeter/logs/ftCheckUser.jmx.log
 ____________________________________________________________________________________
  
- #### END OF README
+#### END OF README