[keycloak-dev] KEYCLOAK-6795 / Silent token refresh for implicit flow
Marek Posolda
mposolda at redhat.com
Fri Mar 15 04:45:01 EDT 2019
On 12/03/2019 19:55, Niko Köbler wrote:
> Hi Marek,
>
> my point was not about the comments what the test is doing - that's something I can read from the code (and hopefully from a good test method name). However, every comment might be helpful.
> I struggled most with JavascriptAdapterTest to figure out, what resources I need else to execute/modify/improve the tests. So it took me half an hour to an hour to figure out, that the TestJavascriptResource class is also "part of" the test. It's located in a completely different subfolder from the actual test:
>
> testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/javascript/JavascriptAdapterTest.java
> vs.
> testsuite/integration-arquillian/servers/auth-server/services/testsuite-providers/src/main/java/org/keycloak/testsuite/rest/resource/TestJavascriptResource.java
>
> You see!? It starts to differ at the 3rd folder level - and then it gets deeper, and deeper, and... ;)
> And I didn't find a good documentation about how the testsuite is structured and organized.
Good point. There was recently added this document [1]. But maybe we
still have some space for the improvement here... Regarding this
particular case, we need to ensure that code inside the
"TestJavascriptResource" is deployed as a provider to the server, so
this code is executed on the server side - usually completely different
JVM than the test JVM. That's why it is in separate place as the module
is deployed as JAR to the server.
[1]
https://github.com/keycloak/keycloak/blob/master/docs/test-development.md
Marek
>
> - Niko
>
>
>> Am 12.03.2019 um 14:08 schrieb Marek Posolda <mposolda at redhat.com>:
>>
>> Hi Niko,
>>
>> Thanks for the PR! I've added some comment in the github.
>>
>> Point taken regarding the tests. Maybe we have some space for improvement here. I personally trying to at least add some comments to the tests about what the test is doing etc. For example see OIDCScopeTest. Do you think it is sufficient for the 1st experience with the testsuite, or would you suggest to improve more?
>>
>> Marek
>>
>> On 11/03/2019 11:34, Niko Köbler wrote:
>>> Thanks Michal,
>>>
>>> thanks for the help.
>>> I struggled before with the notation from here https://github.com/keycloak/keycloak/blob/master/testsuite/integration-arquillian/HOW-TO-RUN.md#run-adapter-tests, as I needed to put the class name of the tests in quotes: -Dtest="org.keycloak.testsuite.adapter.**.*Test" - otherwise I got some shell errors.
>>>
>>> I just pushed the test, build is running.
>>> (It's like a nightmare to implement some tests, if you are not aware of all this stuff, as all your test classes are poorly (aka not-at-all) documented. If you want contributions from the community, you should change this!)
>>> Hope to get it merged soon. :)
>>>
>>> Regards,
>>> - Niko
>>>
>>>> Am 11.03.2019 um 09:45 schrieb Michal Hajas <mhajas at redhat.com>:
>>>>
>>>> Hello,
>>>>
>>>> thank you very much for the contribution.
>>>>
>>>> You can run JavascriptAdapterTest class using the following command executed from keycloak directory:
>>>>
>>>> mvn clean install -f testsuite/integration-arquillian/pom.xml -Dtest=JavascriptAdapterTest
>>>>
>>>> Best regards,
>>>> Michal
>>>>
>>>> On Sat, Mar 9, 2019 at 10:41 AM Niko Köbler <niko at n-k.de <mailto:niko at n-k.de>> wrote:
>>>> I've just created a pull request for this issue, including docs, but still without tests.
>>>> https://github.com/keycloak/keycloak/pull/5932 <https://github.com/keycloak/keycloak/pull/5932>
>>>>
>>>> As the tests are quite complex to run, and I didn't find any information about how to run/execute just the JavascriptAdapterTest.java class without running the whole testsuite over and over again, I'd appreciate any help/hint, of how to run this test only.
>>>>
>>>> Thanks,
>>>> - Niko
>>>>
>>>>
>>>>
>>>>> Am 08.03.2019 um 13:19 schrieb Niko Köbler <niko at n-k.de <mailto:niko at n-k.de>>:
>>>>>
>>>>> Hi team,
>>>>>
>>>>> I'd like to volunteer for https://issues.jboss.org/browse/KEYCLOAK-6795 <https://issues.jboss.org/browse/KEYCLOAK-6795> as this is needed in one of my customers projects and it increases security in handling tokens in SPAs.
>>>>> I've already an idea of how to implement it (and a very rough working draft), but would like to discuss this first with someone of you.
>>>>> Anybody interested in discussing?
>>>>>
>>>>> - Niko
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> keycloak-dev mailing list
>>>>> keycloak-dev at lists.jboss.org <mailto:keycloak-dev at lists.jboss.org>
>>>>> https://lists.jboss.org/mailman/listinfo/keycloak-dev <https://lists.jboss.org/mailman/listinfo/keycloak-dev>
>>>> _______________________________________________
>>>> keycloak-dev mailing list
>>>> keycloak-dev at lists.jboss.org <mailto:keycloak-dev at lists.jboss.org>
>>>> https://lists.jboss.org/mailman/listinfo/keycloak-dev <https://lists.jboss.org/mailman/listinfo/keycloak-dev>
>>> _______________________________________________
>>> keycloak-dev mailing list
>>> keycloak-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/keycloak-dev
>>
More information about the keycloak-dev
mailing list