I agree that it’s not necessarily Ideal, but I have found that there’s the advantage that
the tests to be written for extensions (at least ours) can often be inspired from existing
tests of similar features, and having some of the same classes available simplifies the
process. This is not perfect, as sometimes this requires figuring out what’s going on in
the testsuite code, and also some functional code is in the test section, and thus not
available in the artifacts.
For updating its not really a problem however (I hope). It’s something that often has to
be done anyway for extensions when keycloak changes version, though it may cause some
extra work to account for the refactoring of the testsuite classes as well.
On balance, at least for now, I feel that reusing existing testsuite code lessens the
development burden of the tests for extensions, which is why we went with this solution.
From: Stian Thorgersen <sthorger(a)redhat.com>
Sent: mardi 4 décembre 2018 16:26
To: Doswald Alistair <alistair.doswald(a)elca.ch>
Cc: keycloak-dev <keycloak-dev(a)lists.jboss.org>
Subject: Re: [keycloak-dev] Keycloak testsuite artifacts on maven, for module testing
Thanks for the explanation.
I'm not sure if it makes all that much sense to publish the artifacts as they are as
it is all very much setup to support testing of Keycloak itself and as such contains a lot
of complexity. You'll quite likely also often have to update it as we refactor/change
our tests.
Would be nice to have a simple way to test extensions with Arquillian though.
On Tue, 4 Dec 2018 at 11:36, Doswald Alistair
<alistair.doswald@elca.ch<mailto:alistair.doswald@elca.ch>> wrote:
Re-reading my mail, I feel that I may not have been very clear, sorry.
So: For the cloudtrust project (on github:
https://github.com/cloudtrust), we have
developed or furthered a certain number of extensions (modules) for keycloak (I wrote a
mail on this mailing list about them a few months back, and was asked to list them here:
https://www.keycloak.org/extensions.html), for example an extension to allow keycloak to
use ws-fed or to do a full export while running. We will also soon need to develop some
new modules.
We originally wrote those extensions for keycloak 3.4.3.Final, but we are currently
updating them to the latest version of keycloak, and as part of the process, we are moving
the unit tests from a mock-based system to arquillian, so that they are more meaningful.
To simplify the task, and since the code is already there, we are using existing classes
from the keycloak testsuite.
We are currently only using classes from integration-arquillian-tests-base, for example
the classes LoginPage and OAuthClient. For our current use I don’t actually expect to use
classes from any other artifact, though since we are at the start of the process, I may be
wrong about that. We are also using the pom from integration-arquillian-tests as a parent
for our maven project for now, as a convenience. This will probably have to be changed in
the future.
And basically, though currently we are building keycloak to deploy the testsuite artifacts
to our local artifactory to use them, I was wondering if they are already available on a
public maven repository, or if they could be, like the other keycloak artifacts are.
From: Stian Thorgersen <sthorger@redhat.com<mailto:sthorger@redhat.com>>
Sent: vendredi 30 novembre 2018 09:31
To: Doswald Alistair
<alistair.doswald@elca.ch<mailto:alistair.doswald@elca.ch>>
Cc: keycloak-dev
<keycloak-dev@lists.jboss.org<mailto:keycloak-dev@lists.jboss.org>>
Subject: Re: [keycloak-dev] Keycloak testsuite artifacts on maven, for module testing
Can you add a bit more details please? What modules and how are you using them?
On Thu, 29 Nov 2018, 10:34 Doswald Alistair
<alistair.doswald@elca.ch<mailto:alistair.doswald@elca.ch> wrote:
Hello,
Are the keycloak testsuite artifacts pushed to a public repository? Or if not, would it be
possible to publish them alongside the other keycloak artifacts?
We are currently updating the cloudtrust keycloak modules to the latest version of
keycloak, and as a part of that we are moving the tests from mocks to arquillian. Since
there's a lot of great work already done, we reuse the keycloak testsuite artifacts
for this. For our purposes this is fine (we have them cached in our local repository), but
for anybody who wishes to build our modules from github it's a bit more cumbersome. On
a more general level, it would probably also help other module developers who wish to unit
test with arquillian.
Best regards,
Alistair
_______________________________________________
keycloak-dev mailing list
keycloak-dev@lists.jboss.org<mailto:keycloak-dev@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/keycloak-dev