[keycloak-dev] Running Node.js tests with Chrome instead of Phantomjs

Stian Thorgersen sthorger at redhat.com
Tue May 28 03:14:12 EDT 2019


The JS engine used in HtmlUnit is not very fast and also has other issues.

Perhaps the case is we should default to HtmlUnit when there is no JS
involved (login flows), and use Chrome Headless when there is JS involved
(account, admin, keycloak.js and node.js).

On Mon, 27 May 2019 at 21:50, Marek Posolda <mposolda at redhat.com> wrote:

> On 23/05/2019 09:48, Stian Thorgersen wrote:
> > +1 as long as chrome-headless works everywhere I'd rather see that as the
> > default and stop using phantom-js and htmlunit (or whatever it's called).
> >  From looking at this a looooong time ago I seem to remember
> chrome-headless
> > was faster than everything else.
>
> I think  this is not the case when comparing to HtmlUnit.
>
> HtmlUnit was far faster than other browsers due the fact that it's just
> wrapper over apache HTTP client. All the other web driver
> implementations are subclass of RemoteWebDriver and they use remote
> selenium server as another layer when communicating with the browser.
> This adds the most of the overhead as there is much more network
> communications here and there.
>
> By using the HtmlUnit instead of phantomJS as default browser, the
> testsuite was made 2 times faster. AFAIR there wasn't any subtle
> difference between PhantomJS and other "real" browser WebDriver
> implementations as all just use selenium server. At least that was the
> case few years ago when I was looking at it.
>
> The thing is, that HtmlUnit has quite bad javascript support, which can
> be an issue once we have new Account console and maybe some more
> javascript support in our authenticators.
>
> Marek
>
> >
> > On Thu, 23 May 2019 at 08:51, Michal Hajas <mhajas at redhat.com> wrote:
> >
> >> I created an issue [1] and I will start to work on making it work on
> >> Travis.
> >>
> >> [1] https://issues.jboss.org/browse/KEYCLOAK-10359
> >>
> >> On Wed, May 22, 2019 at 7:46 PM Bruno Oliveira <bruno at abstractj.org>
> >> wrote:
> >>
> >>> Hi Michal, I'm not against changing the browser used for testing, as
> >>> long as we keep Travis happy, like Vašek mentioned.
> >>>
> >>> Before we make this decision, I suggest to first isolate the tests and
> >>> give it a try with some headless browser (maybe chrome-headless). After
> >>> that, we can decide whether or not we should drop phantomjs.
> >>>
> >>> On 2019-05-22, Michal Hajas wrote:
> >>>> Hi all,
> >>>>
> >>>> currently, we are using phantomjs browser for running Node.js tests
> >> [1].
> >>>> However, we are experiencing some issues which seem to be caused by
> >>>> phantomjs, so we are considering to change the default browser from
> >>>> phantomjs to headless chrome.
> >>>>
> >>>> Do you have some objections why not to do so?
> >>>>
> >>>> [1]
> >>>>
> >>
> https://github.com/keycloak/keycloak-nodejs-connect/blob/master/test/utils/webdriver.js#L25
> >>>> _______________________________________________
> >>>> keycloak-dev mailing list
> >>>> keycloak-dev at lists.jboss.org
> >>>> https://lists.jboss.org/mailman/listinfo/keycloak-dev
> >>> --
> >>>
> >>> abstractj
> >>>
> >> _______________________________________________
> >> keycloak-dev mailing list
> >> keycloak-dev at lists.jboss.org
> >> 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