datawareauthic/testsuite/model
github-actions[bot] c11d93d936
Some checks failed
Keycloak CI / Check conditional workflows and jobs (push) Has been cancelled
CodeQL / Check conditional workflows and jobs (push) Has been cancelled
Keycloak Documentation / Check conditional workflows and jobs (push) Has been cancelled
Keycloak Guides / Check conditional workflows and jobs (push) Has been cancelled
Keycloak JavaScript CI / Check conditional workflows and jobs (push) Has been cancelled
Keycloak Operator CI / Check conditional workflows and jobs (push) Has been cancelled
Keycloak CI / Build (push) Has been cancelled
Keycloak CI / Base UT (push) Has been cancelled
Keycloak CI / Base IT (push) Has been cancelled
Keycloak CI / Adapter IT (push) Has been cancelled
Keycloak CI / Adapter IT Strict Cookies (push) Has been cancelled
Keycloak CI / Quarkus UT (push) Has been cancelled
Keycloak CI / Quarkus IT (push) Has been cancelled
Keycloak CI / Java Distribution IT (push) Has been cancelled
Keycloak CI / Login Theme v1 tests (push) Has been cancelled
Keycloak CI / Volatile Sessions IT (push) Has been cancelled
Keycloak CI / External Infinispan IT (push) Has been cancelled
Keycloak CI / AuroraDB IT (push) Has been cancelled
Keycloak CI / Store IT (push) Has been cancelled
Keycloak CI / Store Model Tests (push) Has been cancelled
Keycloak CI / Clustering IT (push) Has been cancelled
Keycloak CI / FIPS UT (push) Has been cancelled
Keycloak CI / FIPS IT (push) Has been cancelled
Keycloak CI / Forms IT (push) Has been cancelled
Keycloak CI / WebAuthn IT (push) Has been cancelled
Keycloak CI / SSSD (push) Has been cancelled
Keycloak CI / Migration Tests (push) Has been cancelled
Keycloak CI / Test Framework (push) Has been cancelled
Keycloak CI / Base IT (new) (push) Has been cancelled
Keycloak CI / Status Check - Keycloak CI (push) Has been cancelled
CodeQL / CodeQL Java (push) Has been cancelled
CodeQL / CodeQL JavaScript (push) Has been cancelled
CodeQL / CodeQL TypeScript (push) Has been cancelled
CodeQL / Status Check - CodeQL (push) Has been cancelled
Keycloak Documentation / Build (push) Has been cancelled
Keycloak Documentation / External links check (push) Has been cancelled
Keycloak Documentation / Status Check - Keycloak Documentation (push) Has been cancelled
Keycloak Guides / Build (push) Has been cancelled
Keycloak Guides / Status Check - Keycloak Guides (push) Has been cancelled
Keycloak JavaScript CI / Build Keycloak (push) Has been cancelled
Keycloak JavaScript CI / Admin Client (push) Has been cancelled
Keycloak JavaScript CI / UI Shared (push) Has been cancelled
Keycloak JavaScript CI / Account UI (push) Has been cancelled
Keycloak JavaScript CI / Admin UI (push) Has been cancelled
Keycloak JavaScript CI / Account UI E2E (push) Has been cancelled
Keycloak JavaScript CI / Generate Test Seed (push) Has been cancelled
Keycloak JavaScript CI / Admin UI E2E (push) Has been cancelled
Keycloak JavaScript CI / Status Check - Keycloak JavaScript CI (push) Has been cancelled
Keycloak Operator CI / Build distribution (push) Has been cancelled
Keycloak Operator CI / Test local (push) Has been cancelled
Keycloak Operator CI / Test remote (push) Has been cancelled
Keycloak Operator CI / Test OLM installation (push) Has been cancelled
Keycloak Operator CI / Status Check - Keycloak Operator CI (push) Has been cancelled
Set version to 26.1.3
2025-02-28 09:50:59 +00:00
..
src Upgrade Infinispan to 15.0.12.Final 2025-02-10 18:48:08 +01:00
pom.xml Set version to 26.1.3 2025-02-28 09:50:59 +00:00
README.md Map Store Removal: Rename Legacy* classes (#26273) 2024-01-23 13:50:31 +00:00
test-all-profiles.sh Use Maven wrapper instead of platform dependent Maven version (#29988) 2024-06-03 15:45:39 +02:00

Model testsuite

Model testsuite runs tests on raw KeycloakSessionFactory which is initialized only with those providers that are explicitly enabled in a used profile via keycloak.model.parameters system property.

This allows writing tests and running those in different configurations quickly.

The valid parameters are names of classes in org.keycloak.testsuite.model.parameters package, and it is possible to combine those by providing multiple class names separated by comma.

To simplify matters, common combinations of parameters are defined as maven profiles.

Test coverage

To see test coverage via jacoco, set jacoco.skip property to false, e.g.:

mvn test -Pjpa -Dtest=ClientModelTest -Djacoco.skip=false

Then you can generate the coverage report by using the following command:

mvn org.jacoco:jacoco-maven-plugin:0.8.7:report \
    -Djacoco.skip=false -Djacoco.dataFile=target/jacoco.exec

The test coverage report is then available from target/site/jacoco/index.html file.

Profiling

If you have Async Profiler installed, you can generate flame graphs of the test run for profiling purposes. To do so, you set libasyncProfilerPath system property to the location of the async profiler library:

mvn test -Pjpa -Dtest=ClientModelTest \
    -DlibasyncProfilerPath=/usr/local/async-profiler/build/libasyncProfiler.so 

The results are available in the target/profile.html file.