codeceptjs / CodeceptJS

Supercharged End 2 End Testing Framework for NodeJS
http://codecept.io
MIT License
4.12k stars 727 forks source link

Debugging in Docker Image #740

Closed lougreenwood closed 7 years ago

lougreenwood commented 7 years ago

Hi,

Just a general question - are there any ENV vars which can be set on the docker image to change the codeceptjs entry point command and thus be used to change the debug output verbosity?

I've recently moved from PhantomJS to NightmareJS, and because nightmare can't run on Alpine Linux (Docker's default OS), I need to use the official CodeceptJS/Nightmare Image. However Nightmare is throwing some weird errors at me and I'm kinda stuck debugging them.

Cheers!

DavertMik commented 7 years ago

Good question,

I personally use Docker image as well but I find it really inconvenient too. If you have ideas how to improve it (without breaking compatibility) I'd like to take a part in it. I'd really like to have APII to change running options, pass config values, etc. If you could come with a better implementation of Docker image and send PR that would be great.

jploskonka commented 7 years ago

Hey, there's CODECEPT_ARGS env var that should be enough for this use case (?), I'm using something like this in my docker-compose.yml:

services:
  codeceptjs.debug:
    image: codeception/codeceptjs:1.0.2
    environment:
      - CODECEPT_ARGS=--debug --steps
    volumes:
      - .:/tests

https://github.com/Codeception/CodeceptJS/blob/74a7b74cb54f7d9ecb27a2fc4417555e55b6b06d/docker/run.sh#L11

lougreenwood commented 7 years ago

@jploskonka Yes, this works for me - thanks for the insight :)