JCEF running headless

Having problems with building or using the JCEF Java binding? Ask your questions here.

JCEF running headless

Postby samson12 » Mon May 19, 2014 7:12 pm

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.
samson12
Newbie
 
Posts: 1
Joined: Mon May 19, 2014 7:04 pm

Re: JCEF running headless

Postby magreenblatt » Tue May 20, 2014 10:28 am

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.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: JCEF running headless

Postby waynemadams » Mon Aug 25, 2014 5:19 pm

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
waynemadams
Newbie
 
Posts: 1
Joined: Mon Aug 25, 2014 11:04 am


Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 13 guests