How to make CircleCi save SCREENSHOTS and LOGS of the browsers console?

Hi guys,

thanks to your help I have managed to get CircleCi running (What is the simplest setup for meteor+chimp on circle-ci?).

Now I am in enhanced mode and need to DEBUG some issues I have.
I’d love to be able to

  1. see screenshots on failure
  2. AND (very important) read the log of the browser’s console.

Does anyone know how to do this witch mocha?

This is my current circle.yml:

# References
#  * https://forums.meteor.com/t/what-is-the-simplest-setup-for-meteor-chimp-on-circle-ci/31627
machine:
  node:
    version: 6.5.0
  java:
    # This is needed by Chimp to run Selenium so we can start Chrome and Firefox
    version: oraclejdk8
  environment:
    _JAVA_OPTIONS: "-Xms512m -Xmx1024m"
    CIRCLE_ENV: circle  # for setting stuff in our .js files depending on environment
    MOCHA_FILE: $CIRCLE_TEST_REPORTS/junit/test-results.xml  # setup reporting for circle (see https://circleci.com/docs/test-metadata/#metadata-collection-in-custom-test-steps)

dependencies:
  pre:
    - pwd
    - cp src/.meteor/versions ${CIRCLE_ARTIFACTS}/versions_pre;
    - cd src; mkdir -p .meteor 
    - if [ ! -e src/.meteor/meteor ]; then cd src; curl https://install.meteor.com | /bin/sh 2>&1 | cat; fi 
    - pwd; cd src; pwd; meteor npm install;  # install npm-packages from ./src/packages.json
    - cd src; meteor --version;  # trying to cache and pre-heat meteor
    # - cd src; meteor --get-ready;  # currently FAILS, probably NOT enough memory
    - cd src; npm install -g chimp
    - cd src; chimp --path=noexist # Cache chimp deps by running it without any tests

  # Run METEOR IN PARALLEL
  post:
    - pwd
    # debug used versions
    - cp src/.meteor/versions ${CIRCLE_ARTIFACTS}/versions_post;
    - less src/.meteor/versions > ${CIRCLE_ARTIFACTS}/meteor.log;
    - date > ${CIRCLE_ARTIFACTS}/meteor.log
    - cd src; meteor test --full-app --driver-package tmeasday:acceptance-test-driver --port 3000 >> ${CIRCLE_ARTIFACTS}/meteor.log 2>&1 & :
        background: true

test:
  post:
    - pwd
    - ls -al
    - cd src; ls -al; node --version; npm --version; java -version; meteor --version;
    - sleep 5m  # give meteor-background some time to wake up
    - cd src; chimp ./tests/_circle-ci-chimp-config.js --ddp=http://localhost:3000 --path=tests --mocha;
1 Like