Albert Nemec Albert Nemec - 2 months ago 28
Node.js Question

CircleCI + Nightwatch: Tests time out

So I'm trying to make Nightwatch.js tests work on CircleCI. During configuration process on CircleCI I ... update Node to most recent version (as we have node server), npm install our packages, download chrome (on which our tests run), successfuly build our code, start prod server, and then run the tests.

Everything is fine when I do this locally, but when I run it on CircleCI VM, all tests time out.

Might it be becouse CircleCI VM doesn't have any graphical interface in which could be browser opened? I don't want to use stuff like PhantomJS as our tests should really test user experience on a specific browser (chrome).

Another tip is that I should create speacial environment for tests. Currently I'm running my tests --env default. If I should, what kind of environment I should define for CI?

Any ideas? Thanks

EDIT: Ok I found out the problem is not with a browser, but becouse localhost is not returning anything. In my CI config a manually start the server with my "npm" script, however for some reason I cannot connect to it. ping is returning "unknown host". Any ideas?

EDIT2: Alright, so the server is running. When I curl localhost:8080 i get custom 404. However when I try to curl actual module (via redirect on "hosts" file that I've made) reponse is...

Empty reply from server returned exit code 52
. Why?


Alright so the problem was that environment variables were set badly, so config of the app was kind of lost.

In circleCI I needed to state my env vars without quotes "" as circleCI automatically inserts them for you.