Skip to content
This repository has been archived by the owner on Sep 3, 2020. It is now read-only.

Improve onboarding when using --download-selenium #133

Closed
searls opened this issue Feb 2, 2015 · 10 comments
Closed

Improve onboarding when using --download-selenium #133

searls opened this issue Feb 2, 2015 · 10 comments

Comments

@searls
Copy link
Contributor

searls commented Feb 2, 2015

Today @timwingfield and I had a rocky onboarding experience with an existing project using Testium. It worked fine when we ran the test suite with phantomjs, but when running with --browser chrome we got an ENOENT error stat'ing node_modules/testium/node_modules/bin/chromedriver.

We didn't know how to proceed so we tried these and they didn't help:

$ npm i -g testium 
$ testium --download-selenium #<-- the README suggested this might work

Then we got the same error. It was only once @EndangeredMassa mentioned we should run locally (e.g. ./node_modules/.bin/testium --download-selenium) that we got to our next error (which was that Java wasn't installed).

Thoughts on improving the onboarding? I feel like it would have been helpful if the README told us to run with the local bin, or if the global actually installed locally. Additionally when the bin is missing (but expected), a clearer error message would have been helpful.

@EndangeredMassa
Copy link
Collaborator

README issues addressed here: #134

What version of testium was this? ENOENT issues should have been fixed in 2.5.0 here: #128

@EndangeredMassa
Copy link
Collaborator

Global support discussed here: #136

@EndangeredMassa
Copy link
Collaborator

When I try this locally without java and without a local chromedriver, I get:

See the full log at: /home/smassa/source/testium/test/integration_log/selenium.log
Error: Unable to find java
  at errnoException (child_process.js:1011:11)
  at Process.ChildProcess._handle.onexit (child_process.js:802:34)

@searls what exactly did you see when trying this locally? How can I reproduce it?

@searls
Copy link
Contributor Author

searls commented Feb 2, 2015

I am running 2.5.0

When node_modules/testium/bin/chromedriver does not exist (e.g. I haven't run --download-selenium yet), I get:

> testium --browser chrome

Preparing chrome...

/Users/justin/code/testdouble/my-project/node_modules/testium/lib/cli/console.js:112
      throw error;
            ^
Error: ENOENT, stat '/Users/justin/code/testdouble/my-project/node_modules/testium/bin/chromedriver'

npm ERR! Darwin 14.1.0
npm ERR! argv "node" "/usr/local/bin/npm" "run" "test-console"
npm ERR! node v0.10.32
npm ERR! npm  v2.1.5
npm ERR! code ELIFECYCLE
npm ERR! my-project@0.0.0 test-console: `testium --browser chrome`
npm ERR! Exit status 8
npm ERR! 
npm ERR! Failed at the my-project@0.0.0 test-console script.
npm ERR! This is most likely a problem with the my-project package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     testium --browser chrome
npm ERR! You can get their info via:
npm ERR!     npm owner ls my-project
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/justin/code/testdouble/my-project/npm-debug.log

@searls
Copy link
Contributor Author

searls commented Feb 2, 2015

You should be able to reproduce by just running rm node_modules/testium/bin/chromedriver and then running testium --browser chrome

@EndangeredMassa
Copy link
Collaborator

When I try removing chromedriver and java, I don't see that error.

Are you running that with a local testium? The example makes it appear to be global.

@searls
Copy link
Contributor Author

searls commented Feb 2, 2015

That was executed with npm run test-console which is configured in package.json as:

    "test-console": "./node_modules/.bin/testium --browser chrome"

@EndangeredMassa
Copy link
Collaborator

Ah, I managed to reproduce this. Will fix.

@EndangeredMassa
Copy link
Collaborator

Fix for running without a local chromdriver: #137

@EndangeredMassa
Copy link
Collaborator

Closing this issue in favor of linked issues/PRs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants