keycloak-scim/testsuite/performance/README.md

39 lines
1.6 KiB
Markdown

Configuration of performance test
=================================
- At this moment it's src/test/jmeter/keycloak_perf_test.jmx where you can configure among other things:
-- "ThreadGroup.num_threads" -- number of worker threads
-- "LoopController.loops" -- Number of loops per each thread.
- src/test/jmeter/system.properties -- System properties including configuration of providers. Allow to specify:
-- which model to use
-- which test to run
-- configuration of individual tests. Properties for each test documented in the file
Running performance tests
=========================
cd KEYCLOAK_HOME/testsuite
mvn clean install -DskipTests=true -Pperformance-tests
Results:
- Log is in: testsuite/performance/target/jmeter/logs/keycloak_perf_test.jmx.log
- More charts and reports are inside: testsuite/performance/target/jmeter/results/
Example for running test
========================
Run:
mvn clean install -DskipTests=true -Pperformance-tests
with OOTB configuration (Assumption is mongo running on 27017 as it's using mongo by default). This will create 10 new realms.
Then change keycloak_perf_test.jmx to have
"ThreadGroup.num_threads" to 10 and
"LoopController.loops" to 100
And change "keycloak.perf.workerClass" to "org.keycloak.testsuite.performance.CreateUsersWorker" in system.properties
Then run again:
mvn clean install -DskipTests=true -Pperformance-tests
This will create 1000 new users (10 worker threads and each worker doing 100 iterations. Each worker is creating users in separate realm)
TODO: Easier configuration without need to edit config files, more user friendly, easier to configure and run test