2

Ok, so I have posted a couple of other questions here that have been unclear so, apologies for another along similar lines. I am a little further along now but am still blocked from progressing. I think perhaps the community for Selenium Builder is not large at the moment and so I'm not finding the help out there.

My goal: setup a simple test framework using Selenium Builder as a FF plugin, GitHub and Jenkins. Retain the test files in .json format. I don't wish to go near java or maven for now.

My current setup: - Selenium Builder add-on for FF28 with Github plugin - Jenkins 1.567 with SeleniumBuilder plugin - Jenkins job setup as a freestyle project, building when a push is made to Git repo and 'Invoke selenium Builder script' as a build step with 'Script file' pointing to root of my test folder(.json scripts)

I can run my .json scripts using se-interpreter from command line using java -jar SeInterpreter.jar example_test.json

What I need to know is - how do I configure Jenkins and the se-interpreter-config file so I can run from Jenkins? currently my interpeter config file looks like this:

{
  "type": "interpreter-config",
  "configurations": [
{
  "settings": [
    {
      "driverOptions": {
        "host": localhost,
        "port": 4444

      },
      "browserOptions": {
        "browserName": "firefox",
      }
    }
  ],
  "scripts": [

    "mySeleniumBuilderTests/tests/*"

      ]
    }
  ]
}

1 Answer 1

1

I would setup a Jenkins free-style job and execute the java based Se Interpreter from a shell-script task

  1. Setup free-style Jenkins build
  2. Schedule build with github with the git-plugin to run job on each commit
  3. Add a shell-script that runs the Se Interpeter in the build and make sure it has a correct exit code to fail/success the run or see this question for options.

    Shell script would look something like this:

    java -jar SeInterpreter.jar --driver=Remote --driver.browserName=firefox --driver.url=http://selenium_grid.local/wd/hub/ tests.json

  4. Setup a Selenium Grid hub and nodes or use the Jenkins SE Grid plugin (which setups each Jenkins node as grid node, but you need to make sure the browsers can start on the Jenkins machines.) to run the tests against.

I would prefer a separate grid or even better run against SauceLabs or TestingBot, since maintaining your own Grid could become cumbersome pretty soon.

There is also a node.js version of the Se Interpreter, which might be interesting for people running a JavaScript stack.

1
  • Niels - many thanks for the detailed reply. As expected, I have some learning to do in respect of Selenium grid as I have not used before but what you've listed makes sense.
    – Steerpike
    Commented Jun 17, 2014 at 7:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.