Skip to content
Permalink
Browse files
Merge remote-tracking branch 'origin/jmeter-plugin-upgrade'
# Conflicts:
#	pom.xml
  • Loading branch information
shawnmckinney committed Jan 17, 2022
2 parents 8e76ba6 + a9de390 commit 71a3ad5bdc8c15f72244e041f775e575f726af20
Showing 2 changed files with 68 additions and 71 deletions.
@@ -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,31 +151,31 @@ 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

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

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

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:
119 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,65 +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>
<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>
<role>${role}</role>
</propertiesSystem>
</configuration>
<executions>
<execution>
<id>jmeter-tests</id>
<goals>
<goal>jmeter</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.apache.directory.fortress</groupId>
<artifactId>fortress-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.directory.fortress</groupId>
<artifactId>fortress-core</artifactId>
<type>test-jar</type>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
<version>${commons-pool2.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>

<!-- This profile calls ant target init-slapd in build-config.xml script. -->
<!-- To execute: mvn -Pinit-slapd test -->
<profile>

0 comments on commit 71a3ad5

Please sign in to comment.