52 Commits

Author SHA1 Message Date
Stian Thorgersen
91a6fc880a Add default surefire args for tests using new testframework
Closes #44098, Closes #44099

Signed-off-by: stianst <stianst@gmail.com>
2026-01-09 08:33:54 +01:00
Lukas Hanusovsky
92849ef5d3 Move AdminClientTest to the new testsuite (#44705)
* Moving files to the new test suite

Signed-off-by: Simon Vacek <simonvacky@email.cz>

* Move AdminClientTest to the new testsuite

Part of: #35040

Signed-off-by: Simon Vacek <simonvacky@email.cz>
Co-authored: Lukas Hanusovsky <lhanusov@redhat.com>

* Refactoring of ManagedCertificates

* Fix compatiblity issue with ManagedCertificates dependency

Signed-off-by: stianst <stianst@gmail.com>

* Fixing trustStrategy for SSLContext truststore.

Signed-off-by: Lukas Hanusovsky <lhanusov@redhat.com>

* Fix FIPS

Signed-off-by: stianst <stianst@gmail.com>

---------

Signed-off-by: Simon Vacek <simonvacky@email.cz>
Signed-off-by: stianst <stianst@gmail.com>
Signed-off-by: Lukas Hanusovsky <lhanusov@redhat.com>
Co-authored-by: Simon Vacek <simonvacky@email.cz>
Co-authored-by: stianst <stianst@gmail.com>
2025-12-17 14:31:22 +00:00
Stian Thorgersen
aa6890f539 Support running test methods on the server side (#44937)
Closes #44936

Signed-off-by: stianst <stianst@gmail.com>
2025-12-17 13:15:42 +01:00
Martin Kanis
5ee4cb5157 Fix for missing object representation in admin event log when deleting user, group, client (#43620)
* Fix for missing object representation in admin event log when deleting user, group, client

Closes #33009

Signed-off-by: jwozniakowski <wozniakowski@netguardians.ch>

* Fix issues and add role representation when deleting a role

Closes #33009

Signed-off-by: Martin Kanis <mkanis@redhat.com>

---------

Signed-off-by: jwozniakowski <wozniakowski@netguardians.ch>
Signed-off-by: Martin Kanis <mkanis@redhat.com>
Co-authored-by: jwozniakowski <wozniakowski@netguardians.ch>
2025-12-09 12:32:18 +01:00
Stian Thorgersen
33b6065c2a Introduces a ManagedWebDriver to provide a single entry point for utilities around WebDriver
This will make it easier to discover various utilities without having to find static methods in various classes; and will also provides us with a wrapper around Selenium where we can add any tweaks needed. It is also now possible to construct a page instance without injection using `page().createPage(MyPage.class)`

Closes #44464

Signed-off-by: stianst <stianst@gmail.com>
2025-11-26 15:20:23 +01:00
Stian Thorgersen
c284f9ae66 Rename ApiUtil to AdminApiUtil (#44224)
Closes #44196

Signed-off-by: stianst <stianst@gmail.com>
2025-11-17 07:52:04 +01:00
Stian Thorgersen
a2c1055f8d Proposed import order (#43432)
* Add importOrder to Spotless

Closes #43235

Signed-off-by: stianst <stianst@gmail.com>

* Re-order imports with Spotless

Signed-off-by: stianst <stianst@gmail.com>

---------

Signed-off-by: stianst <stianst@gmail.com>
2025-11-14 09:34:49 +01:00
stianst
aedd7fe5db Remove unused imports as part of #43233
Signed-off-by: stianst <stianst@gmail.com>
2025-10-13 13:32:01 +02:00
Šimon Vacek
ae7c2d29e8 [Test Framework] Ability to run Keycloak test server with HTTPS (#42616)
* Ability to run Keycloak test server with HTTPS

Closes: #34486

Signed-off-by: Simon Vacek <simonvacky@email.cz>

# Conflicts:
#	test-framework/core/src/main/java/org/keycloak/testframework/CoreTestFrameworkExtension.java
#	test-framework/core/src/main/java/org/keycloak/testframework/server/KeycloakServerConfigBuilder.java

# Conflicts:
#	test-framework/core/src/main/java/org/keycloak/testframework/CoreTestFrameworkExtension.java

* PR review fixes

Signed-off-by: Simon Vacek <simonvacky@email.cz>

* Split keystore into truststore and keystore

Signed-off-by: Simon Vacek <simonvacky@email.cz>

---------

Signed-off-by: Simon Vacek <simonvacky@email.cz>
2025-10-06 12:56:51 +02:00
Steven Hawkins
05c7c625d3 fix: don't show the local access screen if a service account exists (#42218)
closes: #42201

Signed-off-by: Steve Hawkins <shawkins@redhat.com>
2025-09-05 18:22:31 +02:00
Dennis Kniep
d74a10d87a Add TiDB as supported db
Closes #41455

Signed-off-by: Dennis Kniep <kniepdennis@gmail.com>
Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
Co-authored-by: Alexander Schwartz <aschwart@redhat.com>
2025-08-14 07:27:21 +00:00
Šimon Vacek
e664e56b62 Test framework config builders name unification (#41727)
* Test framework config builders name unification

Closes #37275

Signed-off-by: Simon Vacek <simonvacky@email.cz>

* Update test-framework/core/src/main/java/org/keycloak/testframework/realm/RealmConfigBuilder.java

Signed-off-by: Stian Thorgersen <stian@redhat.com>

---------

Signed-off-by: Simon Vacek <simonvacky@email.cz>
Signed-off-by: Stian Thorgersen <stian@redhat.com>
Co-authored-by: Stian Thorgersen <stian@redhat.com>
2025-08-11 12:56:33 +00:00
Lukas Hanusovsky
788e981917 Move UserTest.java to the new testsuite
Part of: #34494

Signed-off-by: Lukas Hanusovsky <lhanusov@redhat.com>
2025-07-16 08:13:30 +02:00
Stian Thorgersen
8a694a585b Add generic update methods for builders (#40312)
Closes #40311

Signed-off-by: stianst <stianst@gmail.com>
2025-07-11 09:03:28 +02:00
Martin Kanis
5a42390341 Make UPDATE_EMAIL a supported feature
Closes #40227

Signed-off-by: Martin Kanis <mkanis@redhat.com>
2025-07-09 10:15:48 -03:00
Alexander Schwartz
83e99f7617 Set the mail.from to avoid looking up the local hostname
Closes #38353

Signed-off-by: Alexander Schwartz <alexander.schwartz@gmx.net>
2025-03-24 09:38:03 +01:00
Stian Thorgersen
d7e3d480fb Sort test classes by server config (#38215)
Signed-off-by: stianst <stianst@gmail.com>
2025-03-20 10:41:31 +01:00
Stian Thorgersen
3cdb8d12ae Updating a client with rollback in a test doesn't reset all values (#38244)
Closes #38243

Signed-off-by: stianst <stianst@gmail.com>
2025-03-19 13:44:13 +01:00
Stian Thorgersen
588cf0f6c2 Attribute added to managed test client with rollback is not removed (#38213)
Closes #38208

Signed-off-by: stianst <stianst@gmail.com>
2025-03-18 15:43:46 +01:00
Stian Thorgersen
7a0fcb6187 Refactor logout methods and move to AbstractOAuthClient (#37882)
Closes #37881

Signed-off-by: stianst <stianst@gmail.com>
2025-03-07 12:15:56 +01:00
Stian Thorgersen
d089e23aef Move token introspection to AbstractOAuthClient (#37859)
Closes #37858

Signed-off-by: stianst <stianst@gmail.com>
2025-03-06 11:56:59 +01:00
Stian Thorgersen
83adc99ef7 Move doWellKnownRequest to AbstractOAuthClient (#37830)
Closes #37829

Signed-off-by: stianst <stianst@gmail.com>
2025-03-05 12:38:08 +01:00
Stian Thorgersen
ab01689aaa Add basic TestApp to the new testsuite (#37815)
Closes #37814

Signed-off-by: stianst <stianst@gmail.com>
2025-03-04 16:59:18 +01:00
Stian Thorgersen
83ef1e3de0 Move verify and parse tokens to AbstractOAuthClient (#37663)
Closes #37660

Signed-off-by: stianst <stianst@gmail.com>
2025-03-03 08:51:41 +01:00
Stian Thorgersen
c22f76867f Move doLogin to AbstractOAuthClient (#37638)
Closes #37637

Signed-off-by: stianst <stianst@gmail.com>
2025-02-26 12:34:03 +01:00
Stian Thorgersen
26e901357f Move UserInfo request to AbstractOAuthClient (#37521)
Closes #37520

Signed-off-by: stianst <stianst@gmail.com>
2025-02-24 10:02:50 +01:00
Stian Thorgersen
d5de190a0d Add OAuthClient supplier for new test framework (#37487)
Closes #37486

Signed-off-by: stianst <stianst@gmail.com>
2025-02-20 06:22:40 +01:00
Lukas Hanusovsky
4c172d99d2 [Test framework] Moving provider classes to specific package (#37484)
Signed-off-by: Lukas Hanusovsky <lhanusov@redhat.com>
2025-02-19 11:00:36 +00:00
Stian Thorgersen
b8c1cd410f Support for running code on the server for tests (#37210)
Closes #34190

Signed-off-by: stianst <stianst@gmail.com>
2025-02-11 14:08:02 +01:00
Stian Thorgersen
b7b84d75d1 Add factory to create custom admin clients (#37125)
Closes #36608

Signed-off-by: stianst <stianst@gmail.com>
Co-authored-by: Simon Vacek <simonvacky@email.cz>
2025-02-10 12:51:56 +01:00
Stian Thorgersen
5b93c3c3ce Add assertions util for admin events (#36778)
Closes #36685

Signed-off-by: stianst <stianst@gmail.com>
2025-01-28 12:40:16 +01:00
Stian Thorgersen
ec2c701a80 Refactor events to use event store instead of syslog (#36684)
Closes #35091

Signed-off-by: stianst <stianst@gmail.com>
2025-01-23 07:40:49 +01:00
Stian Thorgersen
99e2f1df94 Replace createRealm/createClient and invalid use of ref with attachTo (#36640)
Closes #35995

Signed-off-by: stianst <stianst@gmail.com>
2025-01-21 14:05:14 +01:00
Stian Thorgersen
388fa5a3eb Rename org.keycloak.test groupId to org.keycloak.testframework for new test framework artifacts (#36443)
Closes #36431

Signed-off-by: stianst <stianst@gmail.com>
2025-01-14 14:32:03 +01:00
Stian Thorgersen
2d913e5186 Rename org.keycloak.test.framework package to org.keycloak.testframework (#36390)
Closes #36388

Signed-off-by: stianst <stianst@gmail.com>
2025-01-14 10:04:41 +01:00
Stian Thorgersen
d3b759b56f Support injecting admin client configured from managed realm (#35693)
Closes #35501

Signed-off-by: stianst <stianst@gmail.com>
2024-12-06 14:00:16 +01:00
Šimon Vacek
9abbf3edc6 Support setting time offset on test server within tests (#35495)
Closes: #34189

Signed-off-by: Simon Vacek <simonvacky@email.cz>
2024-12-04 12:09:46 +01:00
Stian Thorgersen
6e8a7a844f Support adding clients and users to RealmConfigBuilder (#35542)
Closes #35541

Signed-off-by: stianst <stianst@gmail.com>
2024-12-03 12:23:54 +01:00
Stian Thorgersen
ad313e0109 Add support to intercept server and realm config to test framework (#35184)
Closes #35173

Signed-off-by: stianst <stianst@gmail.com>
2024-11-21 15:13:58 +01:00
Stian Thorgersen
89556c7b79 Add email extension to test framework (#35096)
Closes #35094

Signed-off-by: stianst <stianst@gmail.com>
2024-11-20 08:31:23 +01:00
Stian Thorgersen
5e54ebde18 Move Nimbus OAuth client into separate module (#35090)
Closes #34487

Signed-off-by: stianst <stianst@gmail.com>
2024-11-19 12:24:44 +01:00
Stian Thorgersen
057407385d Add ManagedRealm#getId (#35086)
Closes #35085

Signed-off-by: stianst <stianst@gmail.com>
2024-11-19 11:21:01 +01:00
Stian Thorgersen
ce684e553f Support injecting into superclass of tests (#35084)
Closes #35082

Signed-off-by: stianst <stianst@gmail.com>
2024-11-19 10:52:57 +01:00
Stian Thorgersen
8ebe9000b2 Add support for marking a managed realm as dirty, making updates with rollback, and running cleanup tasks for a realm (#35037)
Closes #35035

Signed-off-by: stianst <stianst@gmail.com>
2024-11-18 14:41:48 +01:00
Stian Thorgersen
4b497dd64c Pass builders to realm, client, and user configs (#35033)
Closes #35032

Signed-off-by: stianst <stianst@gmail.com>
2024-11-18 10:54:11 +01:00
Stian Thorgersen
17fe21a437 Add simple logging support to the test framework (#34956)
Closes #34955

Signed-off-by: stianst <stianst@gmail.com>
2024-11-18 07:36:22 +01:00
Stian Thorgersen
b82ec62eb7 Add database testsuite matrix to new testsuite (#34775)
Closes #34692

Signed-off-by: stianst <stianst@gmail.com>
2024-11-11 07:04:30 +01:00
Lukas Hanusovsky
1192dc3169 [Test framework] AdminEventsSupplier support (#34704)
* [Test framework] AdminEventsSupplier support

Signed-off-by: Lukas Hanusovsky <lhanusov@redhat.com>

* Update test-framework/core/src/main/java/org/keycloak/test/framework/events/AdminEventsParser.java

Co-authored-by: Stian Thorgersen <stian@redhat.com>
Signed-off-by: Lukas Hanusovsky <61745358+lhanusov@users.noreply.github.com>

---------

Signed-off-by: Lukas Hanusovsky <lhanusov@redhat.com>
Signed-off-by: Lukas Hanusovsky <61745358+lhanusov@users.noreply.github.com>
Co-authored-by: Stian Thorgersen <stian@redhat.com>
2024-11-07 10:27:43 +00:00
Lukas Hanusovsky
a8d9a5553f [Test framework] Add custom provider dependencies into a Keycloak server (#34621)
* Add custom provider dependencies into a Keycloak server.

Signed-off-by: Lukas Hanusovsky <lhanusov@redhat.com>
Co-authored-by: Simon Vacek <svacek@redhat.com>

* Update test-framework/examples/pom.xml

Signed-off-by: Stian Thorgersen <stian@redhat.com>

---------

Signed-off-by: Lukas Hanusovsky <lhanusov@redhat.com>
Signed-off-by: Stian Thorgersen <stian@redhat.com>
Co-authored-by: Simon Vacek <svacek@redhat.com>
Co-authored-by: Stian Thorgersen <stian@redhat.com>
2024-11-06 08:39:28 +01:00
fwojnar
b3dd26a7c3 Migrate WelcomeTestPage to testsuite framework (#34543)
* Migrate WelcomeTestPage to testsuite framework

Closes #34491

Signed-off-by: wojnarfilip <fwojnar@redhat.com>

* Refactor welcome page a bit

Signed-off-by: stianst <stianst@gmail.com>

* Fixes for htmlunit

Signed-off-by: stianst <stianst@gmail.com>

* Cleanup imports

Signed-off-by: stianst <stianst@gmail.com>

---------

Signed-off-by: wojnarfilip <fwojnar@redhat.com>
Signed-off-by: stianst <stianst@gmail.com>
Co-authored-by: wojnarfilip <fwojnar@redhat.com>
Co-authored-by: stianst <stianst@gmail.com>
2024-11-05 10:57:58 +01:00