Search code examples
unit-testingseleniumpolymerweb-component-tester

Configure Polymer web-component-tester to use a Selenium Grid server


I need to configure the Polymer web-component-tester to use a Selenium Grid running at http://jenkins.myapp.corp.web:4444/wd/hub so I can run my tests on Jenkins. What is the Grunt config for this? I guessing something like this:

'wct-test': {
  local: {
    options: {
      activeBrowsers: [{
        browserName: 'chrome',
        url: 'http://jenkins.myapp.corp.web:4444/wd/hub'
      }]
    }
  }
}

Solution

  • It turns out there was a bug with web-component-tester that has been fixed in the latest release. We ended up getting it working with our grid using this config:

    var os = require('os');
    ...
    
    'wct-test': {
      local: {
        options: {
          remote: false,
          activeBrowsers: [{
            browserName: "chrome",
            url: "http://jenkins.myapp.corp.web:4444/wd/hub"
          }],
          webserver: {
            hostname: os.hostname()
          }
        }
      }
    }