Quantcast

selenium-grid issues?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

selenium-grid issues?

Michael Higgins
On Tue, 7 Feb 2012 20:43:58 -0500
Richard Lavoie <[hidden email]> wrote:

> Ok I found the logs of the guy who successfully configured headless
> jenkins with selenium. He used the svfb plugin and the envInject
> plugin to set the DISPLAY environment variable.


Well, what I've found so far is that the xvfb plugin just never
works. And the DISPLAY variable is always set, so envInject
shouldn't be needed -- but it still doesn't ever seem to work. But
maybe something else is going on.

. . .

Found an init.d script to run Xvfb. Setting the DISPLAY variable in
$JENKINS_HOME/.profile -- still doesn't work.

That is, until it does.

I've yet to find any rhyme nor reason for what makes it work, though at
this point is seems like poking about in the shell as jenkins is the
key, if it doesn't just start working on its own. So strange...

So again. I restart jenkins. Xvfb is running via init script. DISPLAY
is set in .profile in JENKINS_HOME.

Build now... fails. Run a second time... success. Nothing is changed.
What is going on?

Repeat. Restart jenkins... using the init script, by the way, not the
CLI jar.

Build now... fails several times. Go to jenkins shell, hit enter. Now
builds succeed?!?

Nothing interesting in the logs. VM has only half a gig of ram, but
that should be enough, no?

So, once again, build now ... fails several times in a row. I go to the
shell, hit "enter". Build now... succeeds.

What on earth is happening, I wonder? Does anyone have suggestions for a
possible avenue for nailing this down?

[Last check, set up xvfb init to run in default runlevels, reboot. Now
it works on first try. It's past time to move on to testing actual code,
but I'm not terribly confident this won't just fall over at some point.]

Cheers,

--
Michael Higgins
QA Intern, PuppetLabs
[hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

RE: selenium-grid issues?

Lars Nordin
I've setup a small number of systems to run Selenium servers headless and didn't had much problems.
This was some time ago using selenium 1.0b and Xvfb and not via Jenkins.

Can you split the problem, into what is going with Jenkins and what is going on with Selenium?

Is there some sort of log from the Selenium scripting as to what is going on?
To understand what is going on with the browser, configure Xvfb to use a framebuffer ("-fbdir file") and then use xwd to see snapshots of what the browser is doing. It could be that the browser is taking too long to start, go to a certain page, SSL cert issue, etc.

For the Jenkins, side what the build job running selenium say (i.e. Console Output from the build)?

Another option is to dedicate a VM to run the browser and selenium server and leave it at that - then you can watch what is going on.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: selenium-grid issues?

Michael Higgins
On Wed, 8 Feb 2012 15:11:16 -0500
Lars Nordin <[hidden email]> wrote:

> I've setup a small number of systems to run Selenium servers headless
> and didn't had much problems. This was some time ago using selenium
> 1.0b and Xvfb and not via Jenkins.

Heh. Yeah, not using Jenkins makes things a bit less opaque.

>
> Can you split the problem, into what is going with Jenkins and what
> is going on with Selenium?

Running selenium and driving the tests outside of Jenkins is no
problem, no.

>
> Is there some sort of log from the Selenium scripting as to what is
> going on?

Nothing useful shows in the logs.

> To understand what is going on with the browser, configure
> Xvfb to use a framebuffer ("-fbdir file") and then use xwd to see
> snapshots of what the browser is doing. It could be that the browser
> is taking too long to start, go to a certain page, SSL cert issue,
> etc.

Indeed. The basic problem is when selenium-grid in Jenkins works, it
just works. When it doesn't work, what should be irrelevant actions
seem to make it work. Like, hitting "enter" in a shell as Jenkins user.
This shouldn't make a difference, but it does.

However, at this point, I have a system in state that is working on
boot, so unless that changes, I'm hoping I'm done with attempts
to set it up... except that slave nodes will have to be set up as well,
so still searching for the canonical method that "just works".

>
> For the Jenkins, side what the build job running selenium say (i.e.
> Console Output from the build)?

When it fails, I just get the same error as if there is no framebuffer
configured at all.

>
> Another option is to dedicate a VM to run the browser and selenium
> server and leave it at that - then you can watch what is going on.

Yeah... all these VMs I have to poke at are headless.

Thanks for the feedback!

Cheers,

--
Michael Higgins
QA Intern, PuppetLabs
[hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: selenium-grid issues?

Michael Higgins
In reply to this post by Lars Nordin

Hey, folks... Thanks for the feedback so far.

So what I have inherited is a set of 'rspec' tests. I've modified them
to be able to consume an environment variable 'browser' when setting up
the requested capabilities. So my build step is,

export BROWSER=firefox ; rspec selenium_spec ; export BROWSER=chrome ;
rspec selenium_spec ...

So far, so good -- I think. Now how to add more browsers to the mix?
For example, firefox-9.0.1 firefox-3.6, etc? Is this a feature that is
coming, or something already configurable?

Or do I need to configure different nodes with different versions of
browsers and use the matrix plugin to run across a bunch of nodes? Just
not sure what the intended use case is as the plugin is designed. Like
I should be able to set capabilities.version=x.x.x?

Cheers,

--
Michael Higgins
QA Intern, PuppetLabs
[hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: selenium-grid issues?

Richard Lavoie
Currently the plugin doesn't allow you to set anything about the browser configuration, hence the version of the browser + it's binary path.

This should be taken care of in my next release with the different configuration options.

Are you willing to be a beta tester of that plugin version ?

Richard



On 2012-02-09, at 14:49, Michael Higgins <[hidden email]> wrote:

>
> Hey, folks... Thanks for the feedback so far.
>
> So what I have inherited is a set of 'rspec' tests. I've modified them
> to be able to consume an environment variable 'browser' when setting up
> the requested capabilities. So my build step is,
>
> export BROWSER=firefox ; rspec selenium_spec ; export BROWSER=chrome ;
> rspec selenium_spec ...
>
> So far, so good -- I think. Now how to add more browsers to the mix?
> For example, firefox-9.0.1 firefox-3.6, etc? Is this a feature that is
> coming, or something already configurable?
>
> Or do I need to configure different nodes with different versions of
> browsers and use the matrix plugin to run across a bunch of nodes? Just
> not sure what the intended use case is as the plugin is designed. Like
> I should be able to set capabilities.version=x.x.x?
>
> Cheers,
>
> --
> Michael Higgins
> QA Intern, PuppetLabs
> [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: selenium-grid issues?

Michael Higgins
On Thu, 9 Feb 2012 15:06:34 -0500
Richard Lavoie <[hidden email]> wrote:

> Currently the plugin doesn't allow you to set anything about the
> browser configuration, hence the version of the browser + it's binary
> path.

Thanks for the confirmation.

>
> This should be taken care of in my next release with the different
> configuration options.

Sweet.

>
> Are you willing to be a beta tester of that plugin version ?

Absolutely. Feel free to ping ('mykhyggz') or email me directly. This
s/b a major part of our work-flow moving forward, so anything I can do
to help improve it is to our benefit, of course...

Thanks again.

Cheers,

--
Michael Higgins
QA Intern, PuppetLabs
[hidden email]
Loading...