Hi guys,
I'm just setting up an integration test project for our application and I'm wondering what's the best way to bootstrap keycloak within it.
I'm using arquillian for testing and I'm using the maven-dependency-plugin and maven-resources-plugin to put together a wildfly instance with the keycloak-wildfly-adapter.
So far, that approach works nicely. However, I'm not quite sure yet how to go about
* importing a realm and
* creating a bearer/ access token to use in the test cases
Alternatively, I suppose I could deploy a small helper war or jar that accesses the core services of keycloak to import the realm and create test access tokens (some convenience method like "createLogin()" in a test utility that is deployed with shrink wrap maybe).
Which option do you recommend or is there a third one that I'm missing?
Cheers,
Nils