Skip to content
This repository has been archived by the owner on Mar 4, 2019. It is now read-only.

Cant start runner #2

Closed
baotran2207 opened this issue Feb 10, 2017 · 11 comments
Closed

Cant start runner #2

baotran2207 opened this issue Feb 10, 2017 · 11 comments

Comments

@baotran2207
Copy link

baotran2207 commented Feb 10, 2017

I got this error while trying to run --rm nightwatch

There was an error while starting the test runner:

Error: Cannot read source folder: /home/node/examples/tests
    at /usr/lib/node_modules/nightwatch/lib/runner/run.js:200:21
    at /usr/lib/node_modules/nightwatch/lib/runner/walk.js:97:18
    at FSReqWrap.oncomplete (fs.js:82:15)

I could not find dir examples/tests, did i miss any step ?

ps: i am using docker-engine 1.7 and compose 1.3

@baotran2207 baotran2207 changed the title Docker-compose.yml version 1 format Cant start runner Feb 10, 2017
@blueimp
Copy link
Owner

blueimp commented Feb 10, 2017

Hi @tranthanhbao2207
There is no examples/tests folder in the repo, so I guess you're trying to use your own folder structure.
By default the current working directory in nightwatch will be /home/node, so make sure your custom folders also map into /home/node.

Please also note that docker-compose.yml version 2 files are supported only by Compose 1.6.0+ and require a Docker Engine of version 1.10.0+.
See also https://docs.docker.com/compose/compose-file/compose-versioning/

@blueimp blueimp closed this as completed Feb 10, 2017
@bhajojo
Copy link

bhajojo commented Apr 21, 2017

Can you please explain how this can be done

"so make sure your custom folders also map into /home/node."

@baotran2207
Copy link
Author

@bhajojo i could not make it .May be there was problem at "volume" of nightwatch container.

@blueimp
Copy link
Owner

blueimp commented Apr 25, 2017

If your Nightwatch.js test files are in the ./testdirectory, you have to use the following volumes declaration (same as in the sample docker-compose.yml:

nightwatch:
    volumes:
      - ./test:/home/node

This way your test files will be available to the Nightwatch.js docker container.

@bhajojo
Copy link

bhajojo commented Apr 25, 2017

My Test are stored in ./test folder only , but still i am getting the same exception

There was an error while starting the test runner:

Error: Cannot read source folder: /home/node/examples/tests
at /usr/lib/node_modules/nightwatch/lib/runner/run.js:200:21
at /usr/lib/node_modules/nightwatch/lib/runner/walk.js:97:18
at FSReqWrap.oncomplete (fs.js:82:15)

@blueimp
Copy link
Owner

blueimp commented Apr 25, 2017

Another thing you can check is the permissions of the folder you are host-mounting.
e.g. is it owned by a user/group with ID 1000?
The Nightwatch.js process itself is run with this user/group ID in the Docker container.

@baotran2207
Copy link
Author

After upgrading to latest version(1.17), i got
Waiting for app:80 to become available ... timeout
May be it is all about permissions

@blueimp
Copy link
Owner

blueimp commented Apr 26, 2017

That message actually means that your app is not starting, or not available on port 80 (HTTP).

@bhajojo
Copy link

bhajojo commented Apr 26, 2017

I have got the solution

  1. Copy the whole project in the directory "C://users/Username"
  2. Put all the files of the projects (e.g. Pages folder,reports,TestData,nightwatch.json,specs ) inside the tests folder

I am able to successfully run the tests by performing above steps

Following error is not coming now
There was an error while starting the test runner:

Error: Cannot read source folder: /home/node/examples/tests
at /usr/lib/node_modules/nightwatch/lib/runner/run.js:200:21
at /usr/lib/node_modules/nightwatch/lib/runner/walk.js:97:18
at FSReqWrap.oncomplete (fs.js:82:15)

@baotran2207
Copy link
Author

@bhajojo unfortunately , i do not use windows and my docker is not locally, it is a remotely one.

@baotran2207
Copy link
Author

I got this err because i exec command "docker-compose" on my local pc. Volume takes the "specs" dir of remote server(which means null) , instead of from my local pc.

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

3 participants