docker-selenium icon indicating copy to clipboard operation
docker-selenium copied to clipboard

docker-selenium/test.sh sanity script fails to run Firefox tests

Open onlywade opened this issue 11 years ago • 2 comments

The test.sh script is meant to run a sanity test against both node-chrome and node-firefox, but is exiting with a success status after running only the node-chrome test. It appears that the command string that gets passed to npm in the Test container (via the $TEST_CMD variable set in Test/Dockerfile and referenced in Test/package.json) is being evaluated as a binary with a list of arguments rather than a raw shell command.

The value set in Dockerfile is node smoke-chrome.js && node smoke-firefox.js but modifying the first script to print node's argument list shows:

[ 'node',
  '/usr/src/app/smoke-chrome.js',
  '&&',
  'node',
  'smoke-firefox.js' ]

This has something to do with using the environment variable in package.json rather than a literal command string. Replacing the variable reference with the actual command results in both test scripts running successfully.

onlywade avatar Mar 25 '15 01:03 onlywade

Note that this issue can mask major problems, such as in Issue #31 -- running test.sh on Ubuntu currently passes, even though node-firefox doesn't work there.

onlywade avatar Mar 25 '15 17:03 onlywade

Well, that's a problem. Thanks.

ghost avatar Jun 09 '15 00:06 ghost