Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Contains instructions to load test Apache Fortress using the Apache Maven Jmeter plugin.
.--------------. | Maven | '-------.------' | in-process .-------'-------. | Jmeter plugin | '-------.-------' | in-process .-------'------. | FortressCore | '-------.------' | LDAPS .---------'-------. | DirectoryServer | '-----------------'
mvn verify
command to invoke maven jmeter plugin which then executes jmeter tests running various fortress core test cases.mvn install -Dload.file=./ldap/setup/JmeterTestPolicy.xml
A. Add User:
B. Del User:
C. Check User:
These settings affect the length, duration, and the number of 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>
From FORTRESS_HOME folder, enter the following command from a system prompt:
A. Add Users:
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
qualifier=A1 <-- this is used to construct userid: hostname + qualifier + counter
verify=true <-- will read after operation to verify success
update=true <-- will edit user's description if set to true
sleep=30 <-- sleep this many millisecones after each op
ou=loadtestu <-- this is a required attribute on user entry and must exist in user ou tree prior to test
role=jmeterrole <-- this is an optional attribute on user entry
All but hostname may also be set as properties in add config or del config files.
B. Delete Users:
mvn verify -Ploadtest -Dtype=ftDelUser -Dqualifier=A1 -Dverify=true -Dsleep=30
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
This test performs createSession on users. It uses runtime arguments to define behavior:
A. Qualifier property.
mvn verify -Ploadtest -Dtype=ftAddUser -Dqualifier=A1
hostname-A1-1 hostname-A1-2 hostname-A1-3 ... hostname-A1-1000
mvn verify -Ploadtest -Dtype=ftAddUser -Dqualifier=A2
mvn verify -Ploadtest -Dtype=ftDelUser -Dqualifier=A1
B. Verify
mvn verify -Ploadtest -Dtype=ftAddUser -Dqualifier=A1 -Dverify=true
C. Update
mvn verify -Ploadtest -Dtype=ftAddUser -Dqualifier=A1 -Dupdate=true
D. Role
mvn verify -Ploadtest -Dtype=ftAddUser -Dqualifier=A1 -Drole=jmeterrole
E. Perm
mvn verify -Ploadtest -Dtype=ftCheckUser -Dperm=jmeterobject.oper
obj: jmeterobject op oper1 obj: jmeterobject op oper2 obj: jmeterobject op oper3 ... obj: jmeterobject op oper10
A. View the results
B. View the logs