[almighty] Starting a thread - how to best simulate a user login in ALMighty UI for test purposes?

Aslak Knutsen aslak at redhat.com
Fri Nov 4 19:03:43 UTC 2016


Yes

On Fri, Nov 4, 2016 at 1:28 PM, Leonard Dimaggio <ldimaggi at redhat.com>
wrote:

> Aslak,
>
> Can we rely on this endpoint always being supported - provided that a
> server is run in dev mode?
>     http://localhost:8080/api/login/generate
>
>
> Thanks!,
> Len
>
>
> On Fri, Oct 28, 2016 at 5:44 AM, Aslak Knutsen <aslak at redhat.com> wrote:
>
>> In "Continuous Enterprise Development in Java" we didn't fake it, we
>> actually did a full-scale login. We did it in the background as an
>> Arquillian extension to avoid the TestCase having to care about it. The
>> test case was written without security in mind, but security was enabled in
>> the background if setup required it. (e.g. same test case could be used as
>> an integration and full functional test)
>>
>> Example using htmlunit to do a login cycle to get a session/token using
>> Twitter as provider:
>> https://github.com/arquillian/continuous-enterprise-developm
>> ent/blob/master/code/application/service/security/src/test/
>> java/org/cedj/geekseek/service/security/test/arquillian/TwitterLogin.java
>>
>> It requires the username/password secrets to run, but that's the only way
>> as far as I know to do a full test.
>>
>> Depending on the level of testing you're asking for, there is a REST API
>> to call to get valid tokens that are open if you run the server in dev mode:
>>
>>     ALMIGHTY_DEVELOPER_MODE_ENABLED=1 ./bin/alm
>>
>>     http://localhost:8080/api/login/generate
>>
>>
>> -aslak-
>>
>>
>> On Thu, Oct 27, 2016 at 3:50 PM, Konrad Kleine <kkleine at redhat.com>
>> wrote:
>>
>>> Hi Len,
>>>
>>> a quick search for OAuth Test revealed a site that seems to provide a
>>> test server: http://term.ie/oauth/example/ and a test client:
>>> http://term.ie/oauth/example/client.php
>>>
>>> Maybe this is worth looking into.
>>>
>>> Regards,
>>> Konrad
>>>
>>>
>>>
>>> On Thu, Oct 27, 2016 at 3:28 PM, Michael Kleinhenz <kleinhenz at redhat.com
>>> > wrote:
>>>
>>>>
>>>> Can we mock the GitHub AuthN? It's just oAuth, right?
>>>>
>>>>
>>>> On Thu, Oct 27, 2016 at 3:08 PM, Leonard Dimaggio <ldimaggi at redhat.com>
>>>> wrote:
>>>>
>>>>> Hey everyone,
>>>>>
>>>>> I wanted to get input from people on the best way to mock/simulate a
>>>>> login to ALMighty for testing. We currently use a fake login for these
>>>>> tests (https://github.com/almighty/almighty-ui/tree/master/src/tes
>>>>> ts/work-item/work-item-list) - but we also want to be able to
>>>>> automate the testing of actual logins.
>>>>>
>>>>> Please reply all with ideas - suggestions, etc.
>>>>>
>>>>> Thanks!,
>>>>> Len D.
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Len DiMaggio (ldimaggi at redhat.com)
>>>>> JBoss by Red Hat
>>>>> 314 Littleton Road
>>>>> Westford, MA 01886  USA
>>>>> tel:  978.392.3179
>>>>> cell: 781.472.9912
>>>>> http://www.redhat.com
>>>>> http://community.jboss.org/people/ldimaggio
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> almighty-public mailing list
>>>>> almighty-public at redhat.com
>>>>> https://www.redhat.com/mailman/listinfo/almighty-public
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Michael Kleinhenz
>>>> Principal Software Engineer
>>>>
>>>> Red Hat Deutschland GmbH
>>>> Werner-von-Siemens-Ring 14
>>>> 85630 Grasbrunn
>>>> Germany
>>>>
>>>> RED HAT | TRIED. TESTED. TRUSTED.
>>>> Red Hat GmbH, www.de.redhat.com,
>>>> Registered seat: Grasbrunn, Commercial register: Amtsgericht München,
>>>> HRB 153243,
>>>> Managing Directors: Paul Argiry, Charles Cachera, Michael Cunningham,
>>>> Michael O'Neill
>>>>
>>>> _______________________________________________
>>>> almighty-public mailing list
>>>> almighty-public at redhat.com
>>>> https://www.redhat.com/mailman/listinfo/almighty-public
>>>>
>>>>
>>>
>>> _______________________________________________
>>> almighty-public mailing list
>>> almighty-public at redhat.com
>>> https://www.redhat.com/mailman/listinfo/almighty-public
>>>
>>>
>>
>> _______________________________________________
>> almighty-public mailing list
>> almighty-public at redhat.com
>> https://www.redhat.com/mailman/listinfo/almighty-public
>>
>>
>
>
> --
> Len DiMaggio (ldimaggi at redhat.com)
> JBoss by Red Hat
> 314 Littleton Road
> Westford, MA 01886  USA
> tel:  978.392.3179
> cell: 781.472.9912
> http://www.redhat.com
> http://community.jboss.org/people/ldimaggio
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/almighty-public/attachments/20161104/c36348a4/attachment.htm>


More information about the almighty-public mailing list