Skip to content
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

Can we speed up our Nightwatch tests by running them in PhantomJS ? #39

Open
nelsonic opened this issue Nov 1, 2016 · 9 comments
Open

Comments

@nelsonic
Copy link
Member

nelsonic commented Nov 1, 2016

On a reasonably "mature" project, e.g: https://github.com/TheScienceMuseum/collectionsonline we are running several end-to-end test scenarios: https://github.com/TheScienceMuseum/collectionsonline/tree/master/test/client
Running all of these tests takes 3 Minutes on localhost and 4.28 minutes on Travis-CI e.g: https://travis-ci.org/TheScienceMuseum/collectionsonline/builds/172018586#L3263

Can we investigate using PhantomJS instead of Chrome to reduce the amount of time that it takes to run our tests?

Starting point: https://github.com/nightwatchjs/nightwatch/wiki/Running-tests-in-PhantomJS

@SimonLab
Copy link
Member

SimonLab commented Nov 1, 2016

Time for running Nightwatch tests on SMG:
frontend-tests

@nelsonic
Copy link
Member Author

nelsonic commented Nov 1, 2016

A quick read of the Wiki page: https://github.com/nightwatchjs/nightwatch/wiki/Running-tests-in-PhantomJS
indicates that we need to use: https://github.com/detro/ghostdriver for this.
This is going to require a time-boxed spike...

@jedwards1211
Copy link

Just a tip: I've been using webdriver.io with the wdio-phantomjs-service to run integration tests for awhile, it's super easy. Probably a better bet than ghostdriver.

@jedwards1211
Copy link

@nelsonic don't know if it will be a big speedup though. They're both WebKit-based browsers. But the simplicity of test setup alone justifies it in my opinion

@nelsonic
Copy link
Member Author

nelsonic commented Nov 2, 2016

@jedwards1211 thanks very much for reminding us about http://webdriver.io
I think the reason I didn't consider using it was because it looks "unfinished" ...

webdriverio-badges-sad-state

But good to hear that you are having success with it.
Our primary objective is test execution speed. 🐌 >> 🐎

@jedwards1211
Copy link

Heh, fair point...I'm confused though, ghostdriver doesn't have any badges at all ;)

@nelsonic
Copy link
Member Author

nelsonic commented Nov 3, 2016

@jedwards1211 yeah, the situation with ghostdriver is way worse ... 😢
which is why we are considering switching to: dwyl/learn-karma#6 😇
but... we are willing to give Nightwach a "last chance" if we can get it to run faster ... 😉

I consider nightwatch to be our psycho-ex will be stoked if we can move on ...! 😜

@jedwards1211
Copy link

hahaha nice 😄 But you can't do integration tests with karma, can you?
I think webdriver made the mistake of showing the build badge for master in their README, which will show error from time to time since they are developing on master. (At the moment it's passing again). They're working on it actively and I'm sure they'll improve test coverage with time.

@DevS1993
Copy link

@nelsonic (i'm like 2 years late in this thread) Have your tried running your nightwatch tests in a HEADLESS manner? the test execution will be crazy fast.

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

No branches or pull requests

4 participants