-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug #16 - Add selenium, r=johanlorenzo #17
Conversation
cc98ec5
to
7edd610
Compare
r=? @JohanLorenzo I can do a follow-up to add mocha instead of calling selenium-webdriver straight from the main thread of the .js file. |
7edd610
to
df91068
Compare
script: | ||
- cargo build | ||
- RUST_BACKTRACE=1 cargo test | ||
- ((cargo run ; true) > /dev/null & node test/selenium/ftu_test.js && killall -HUP foxbox) || (killall -HUP foxbox ; exit 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bash is not that strong, I imagine this line can be improved to look nicer. I did test that it fails/passes on Travis if the test fails/passes, and that in both cases the cargo server is killed, and its exit code is ignored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we could simplify that with:
- cargo run &> /dev/null & # make an instance run while we run integration tests
- node test/selenium/ftu_test.js
Would this keep the Travis machine up if we don't kill the foxbox process?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, tried this, but it has to be in the same line.
12ad1e5
to
75522fe
Compare
I removed the step of installing nvm, because it turns out nvm is already installed. I also simplified the test line because I found out stopping the cargo server after the test finished is not necessary. Splitting commands to separate script lines in .travis.yml doesn't work, the servers are killed in between. Will make switching to selenium-standalone a follow-up. |
script: | ||
- cargo build | ||
- RUST_BACKTRACE=1 cargo test | ||
- cargo run > /dev/null & node test/selenium/ftu_test.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Could you add a ;
just between &
and node
? It'll make the fact that 2 commands are on the same line, more obvious.
cargo run > /dev/null & ; node test/selenium/ftu_test.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That syntax errors with unexpected token ;
, but changed it to:
(cargo run > /dev/null &) ; node test/selenium/ftu_test.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad, it was working under my zsh. I should have checked on bash.
- "wget http://selenium-release.storage.googleapis.com/2.50/selenium-server-standalone-2.50.1.jar" | ||
- "java -jar selenium-server-standalone-2.50.1.jar > /dev/null &" | ||
- sleep 5 | ||
- nvm install 4.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay! nvm is already present :)
75522fe
to
cc527b6
Compare
Bug #16 - Add selenium, r=johanlorenzo
Work in progress.