Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-9799

Let Jenkins start/stop X server with Selenium RC servers

    Details

    • Type: New Feature
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: selenium-plugin
    • Labels:
      None
    • Environment:
      Linux, headless
    • Similar Issues:

      Description

      If launching selenium locally, on a per-job basis, it's easy enough to use the Xvnc plugin to manage a Xvnc session for the lifetime of the build. But using the selenium grid plugin, we can't use that plugin because the Selenium RC server is launched along with Jenkins, and for Selenium to access an X display, the X server has to be already running at the time Jenkins starts.

      It would be helpful if Jenkins could a) start Xvnc similar to the way the Xvnc plugin does it, adding DISPLAY to the environment so that Selenium RC knows what display to use, b) try to determine if Selenium is going to work at all, based on the presence (or absence) of an X display. Currently, Jenkins will kick off several Selenium servers on each node (one per executor), but if there is no X display on that machine, it's a complete waste, because selenium will never be able to run on that machine. Jenkins should be able to know that Selenium is doomed to fail, and simply refuse to start it if it can't.

      It would be helpful to have some sort of feedback from the plugin (like in the log file, "WARN: Not launching selenium because no display is available") – so that at least we know that there is a problem, and a hint as to how to fix it.

      I haven't gone too far into how Jenkins interacts with Selenium yet, but ideally, if Jenkins is able to launch the selenium RC server on-demand, rather than on startup, it would be able to wrap that session in an Xvnc/Xvfb launch, so that X is only running for the duration of the tests. I'd rather not keep an X server running 24/7 just so we can get once-a-day selenium tests (for example).

        Attachments

          Issue Links

            Activity

            Hide
            darkrift Richard Lavoie added a comment -

            The idea at first as I understand it was not to only make your test once a day but let people use your jenkins instance to run their tests when they are doing dev (using resources that are not or hardly available otherwise).

            The xvfb plugin can leverage this because it runs a lite in memory X server on start of the node as well.

            The latest version of the grid plugin allows the configurations to specify the DISPLAY environment variable to determine which X display to use.

            I'd have to think about it if you want a per job basis selenium launch.

            Show
            darkrift Richard Lavoie added a comment - The idea at first as I understand it was not to only make your test once a day but let people use your jenkins instance to run their tests when they are doing dev (using resources that are not or hardly available otherwise). The xvfb plugin can leverage this because it runs a lite in memory X server on start of the node as well. The latest version of the grid plugin allows the configurations to specify the DISPLAY environment variable to determine which X display to use. I'd have to think about it if you want a per job basis selenium launch.

              People

              • Assignee:
                darkrift Richard Lavoie
                Reporter:
                jhansche Joe Hansche
              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: