I have been trying to run my functional tests on circleCI 2 for a while now. I’m using circleci/node:10.1.0-browsers
as image as it should have running Xvfb and browsers installed. Every time the error I’m getting:
Running "intern:functional" (intern) task
Listening on 0.0.0.0:8889
Running FieldAware Functional Test Suites...
⚠️ Some suites are temporarily disabled pending fixes to FieldAware module loading within the test cases
Tunnel started
>> Suite chrome on any platform FAILED
UnknownError: [POST http://localhost:4444/wd/hub/session / {"desiredCapabilities":{"selenium-version":"2.53.1","name":"/app/dist/tests/intern-functional.js","idle-timeout":60,"browserName":"chrome"}}] An unknown server-side error occurred while processing the command.
at Server.createSession <node_modules/leadfoot/Server.js:362:15>
at <node_modules/intern/lib/executors/Runner.js:198:23>
at retry <node_modules/intern/lib/util.js:818:13>
at <node_modules/dojo/Promise.ts:393:15>
at runCallbacks <node_modules/dojo/Promise.ts:11:11>
at <node_modules/dojo/Promise.ts:317:4>
at run <node_modules/dojo/Promise.ts:237:7>
at <node_modules/dojo/nextTick.ts:44:3>
at process._tickCallback <internal/process/next_tick.js:61:11>
>> TOTAL: tested 0 platforms, 0/0 tests failed; fatal error occurred
Error: Run failed due to one or more suite errors
at emitLocalCoverage <node_modules/intern/lib/executors/Executor.js:363:18>
at finishSuite <node_modules/intern/lib/executors/Executor.js:380:15>
at <node_modules/intern/lib/executors/Executor.js:388:8>
at <node_modules/intern/browser_modules/dojo/Promise.ts:393:15>
at runCallbacks <node_modules/intern/browser_modules/dojo/Promise.ts:11:11>
at <node_modules/intern/browser_modules/dojo/Promise.ts:317:4>
at run <node_modules/intern/browser_modules/dojo/Promise.ts:237:7>
at <node_modules/intern/browser_modules/dojo/nextTick.ts:44:3>
at process._tickCallback <internal/process/next_tick.js:61:11>
Warning: Test failure; check output above for details.a Use --force to continue.
Aborted due to warnings.
Which I’m pretty sure it is because it cannot open the browser.
here is my circle.yml
version: 2
jobs:
build:
working_directory: ~/fieldaware/fieldaware-frontend
parallelism: 1
shell: /bin/bash --login
branches:
only:
- /release\/.*/
- /feature\/.*/
- /hotfix\/.*/
docker:
- image: circleci/node:10.1.0-browsers
steps:
- checkout
# Validate package.json (no dependencies -> script can be run before install)
- run: npm run validate:package
- run:
name: Install bower and grunt
command: sudo npm -g install bower@1.8.4 grunt-cli@1.3.1
- run:
name: Install ruby
command: |
make ruby
echo 'export PATH=$PATH:~/fieldaware/fieldaware-frontend/build/rbenv/versions/2.2.2/bin' >> $BASH_ENV
- run: make install
# Test
- run: grunt lint
- run:
name: Run unit tests
command: npm test
- run:
name: functional tests
command: grunt test:functional
- run: npm run release
- run: grunt fa-package
I’m using internjs with the following config:
// The port on which the instrumenting proxy will listen
proxyPort: 8889,
// A fully qualified URL to the Intern proxy
proxyUrl: 'http://localhost:8889/',
// 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.53.1'
},
// 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: 'chrome'}
],
// Maximum number of simultaneous integration tests that should be executed on the remote WebDriver service
maxConcurrency: 1,
// Whether or not to start Sauce Connect before running tests
tunnel: 'NullTunnel',
...
Tests are running OK locally but Xvfb does not seem to run the browser.
thank you