[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Instantly share code, notes, and snippets.

@neonstalwart
Last active July 31, 2024 20:57
Show Gist options
  • Save neonstalwart/6630466 to your computer and use it in GitHub Desktop.
Save neonstalwart/6630466 to your computer and use it in GitHub Desktop.
how to run intern self tests with a local selenium
$ brew install selenium-server-standalone chromedriver
$ git clone git@github.com:theintern/intern.git
$ cd intern
$ npm install --production
$ ln -s .. node_modules/intern
$ curl https://gist.github.com/neonstalwart/6630466/raw/f0e4e4efbefa40c746f7c68e2bb4fa0dd5215047/selftest.local.intern.js > tests/selftest.local.intern.js
$ java -jar /usr/local/opt/selenium-server-standalone/selenium-server-standalone-2.35.0.jar -p 4444 &
$ node node_modules/intern/runner.js config=tests/selftest.local.intern
define({
// The port on which the instrumenting proxy will listen
proxyPort: 9000,
// A fully qualified URL to the Intern proxy
proxyUrl: 'http://localhost:9000/',
// Default desired capabilities for all environments. Individual capabilities can be overridden by any of the
// specified browser environments in the `environments` array below as well. See
// https://code.google.com/p/selenium/wiki/DesiredCapabilities for standard Selenium capabilities and
// https://saucelabs.com/docs/additional-config#desired-capabilities for Sauce Labs capabilities.
// Note that the `build` capability will be filled in with the current commit ID from the Travis CI environment
// automatically
capabilities: {
'selenium-version': '2.35.0',
'idle-timeout': 30
},
// Browsers to run integration testing against. Note that version numbers must be strings if used with Sauce
// OnDemand. Options that will be permutated are browserName, version, platform, and platformVersion; any other
// capabilities options specified for an environment will be copied as-is
environments: [
{ browserName: 'firefox' },
{ browserName: 'safari' },
{ browserName: 'chrome' }
],
// Maximum number of simultaneous integration tests that should be executed on the remote WebDriver service
maxConcurrency: 3,
// Whether or not to start Sauce Connect before running tests
useSauceConnect: false,
// Connection information for the remote WebDriver service. If using Sauce Labs, keep your username and password
// in the SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables unless you are sure you will NEVER be
// publishing this configuration file somewhere
webdriver: {
host: 'localhost',
port: 4444
},
// Configuration options for the module loader; any AMD configuration options supported by the Dojo loader can be
// used here
loader: {
// Packages that should be registered with the loader in each testing environment
packages: [ { name: 'intern-selftest', location: '.' } ],
map: { 'intern-selftest': { dojo: 'intern-selftest/node_modules/dojo' } }
},
// Non-functional test suite(s) to run in each browser
suites: [ 'intern-selftest/tests/all' ],
// Functional test suite(s) to run in each browser once non-functional tests are completed
functionalSuites: [ 'intern-selftest/tests/functional/basic' ],
// A regular expression matching URLs to files that should not be included in code coverage analysis
excludeInstrumentation: /^(?:tests|node_modules)\//
});
@dojonodex
Copy link

hello, I am running this inside Gitbash and got an issue, with the "node_modules/intern/runner.js"
file is missing. Appreciate if that missing file could be posted.
Thank you
JC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment