Page 1 of 1

JCEF running headless

PostPosted: Mon May 19, 2014 7:12 pm
by samson12
Goal: I want to simulate many clients executing my javascript heavy project for load testing purposes on a Linux host.

My thought: I can create several CefBrowser instances using JCEF and load my URL to mimic several browser instances.

1) Is there any issues with creating the browsers from a single CefClient instance? Or would it be better to use N CefClient instances for N browsers?

2) Is there a way to have the browsers run "headless" (i.e. no screen rendering). I'd like to be able to spin up a lot of these instances with minimal overhead, however that is best accomplished. I think this is what OSR is for, but can't figure out the best way to do this with JCEF.

Re: JCEF running headless

PostPosted: Tue May 20, 2014 10:28 am
by magreenblatt
samson12 wrote:1) Is there any issues with creating the browsers from a single CefClient instance? Or would it be better to use N CefClient instances for N browsers?

No known issues. If you find any please file a JCEF bug.

samson12 wrote:2) Is there a way to have the browsers run "headless" (i.e. no screen rendering). I'd like to be able to spin up a lot of these instances with minimal overhead, however that is best accomplished. I think this is what OSR is for, but can't figure out the best way to do this with JCEF.

It is not currently supported by the API, but you can modify the JCEF Java code to make it happen.

Re: JCEF running headless

PostPosted: Mon Aug 25, 2014 5:19 pm
by waynemadams
Hi all:
I don't necessarily want to run headless, but I do want to load a browser, establish a websocket connection and some initial traffic, and only then display the browser when it comes up in the queue as the next screen to show. So I think I'm looking at the same issue. I think I've misunderstood the definition of OSR, as I see no request is actually made until setVisible(true), which is too late. Can you steer me towards where, in the JCEF code, I should look to be able to do this? I've been looking, and not quite getting it. I'm on Ubuntu 12.
Thanks in advance -- Wayne