Yes, for example LoginTest for testing the authentication. Then for
example AccessTokenTest, which also adds the scenarios for exchange
code-to-token after authentication is successfully finished. Finally
adapter tests like UndertowDemoServletsAdapterTest (and it's
superclass), which tests full integration with the 3rd party scenarios.
Note that all tests starts with preparing the environment (import realm
with JSON and configure it, deploy apps in case of adapter tests). If
you run your test against already prepared pre-configured environment,
you don't need to care about that.
Marek
On 26/01/17 08:31, Known Michael wrote:
Hey Marek,
I have found a lot of tests there.
Can you point me to some test that accesses to OIDC server and
performs OIDC protocol.
Michael
On Fri, Jan 20, 2017 at 10:23 AM, Marek Posolda <mposolda(a)redhat.com
<mailto:mposolda@redhat.com>> wrote:
On 20/01/17 06:06, Known Michael wrote:
Hey,
We start to create automation tests of our keycloak integration.
We already have some automated tests and we use selenium. See our
testsuite for more details (testsuite/integration-arquillian in
the Keycloak codebase) . Maybe you can take a look for the
inspiration?
We have discovered that the action URL of the login form (the
submit URL)
is generated each time.
Therefore we need to parse the login response to get the
action from the
login from.
Can you suggest the better way to get the action of the login
form?
If not: do you think the way of the action generation can be
changed
significantly in the near future and all our test will fail?
In theory, that is possible as it is an implementation detail of
Keycloak. Rely on something like selenium, which will just call
"submitButton.click" instead of manually creating POST requests
etc is always less fragile. So I would rather go this way if it is
possible for you.
Marek
_______________________________________________
keycloak-user mailing list
keycloak-user(a)lists.jboss.org
<mailto:keycloak-user@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/keycloak-user
<
https://lists.jboss.org/mailman/listinfo/keycloak-user>