daaaammmn !!! My chimp-based acceptence tests are slowing me down sooooo much that I thought it might be worth the free tier of CircleCi a try.
I am aware of https://github.com/xolvio/qualityfaster which looks really cool, but it seems like it needs some time to adapt to my testing setup (Blaze, Mocha for unit-tests, Chimp for acceptance tests).
All I need for now is CircleCi to run my Chimp-tests. Does anyone have a really simple circle.yml that does nothing but to run a chimp --mocha --path=tests?
Hmmm… ok, the first problem was, that the circle.yml was in the wrong place ("/src/circle.yml").
I put it into the root and am starting to see errors (which is great)! Right now I am getting errors about npm packages missing, so we also need to have a command to load them via src/packages.json.
By the way: Chimp does NOT automatically run a meteor instance to test against. How do we do that? I read something about a parallel-option somewhere?
Yeah finally I am getting a {"code":-32603,"message":"Cannot navigate to invalid URL"}-error within chimp. So now I need to run an meteor-instance parallel.
I can’t remember all the reasons for some of the stuff in there, but the following might help you out.
I do remember that I couldn’t get around the need for that three minute sleep! It took THAT long for Meteor to get ready.
Your exerp looks really interesting and might contain the solution.
Do you mind posting the full file? I’d love to see what CIRCLE_ARTIFACTS, METEOR_CMD and CHIMP_CMD is?
@sam: Thanks a lot for this link. I wasn’t aware that the the DEV-branch is so different. I really like the way that you structured it - this looks like the cleanist solution out there.
Do you think you can add a meteor task for the gump? Maybe it might be a good idea to have a simple circle-ci setup that totally follows the meteor guide with 2 test-runners 1) mocha for unit- and integretion-tests 2) chimp for e2e tests?
Oh yeah! That time-machine is on its way and will soon deliver.
In the meantime I am getting a timeout error with my improvised circle.yml:
[chimp] Running...
1) "before all" hook
0 passing (5m)
1 failing
1) "before all" hook:
Error: timeout of 300000ms exceeded. Ensure the done() callback is being called in this test.
my current cicle.yml looks like this (dirty)
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"
METEOR_CMD: .meteor/meteor
CIRCLE_ENV: test # for setting stuff in our .js files depending on environment
dependencies:
cache_directories:
- ~/project/src/.meteor
- ~/projectsrc/.npm
- ~/project/src/node_modules
pre:
- pwd
- 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; npm install; # install npm-packages from ./src/packages.json
- cd src; npm install -g chimp
- cd src; chimp --path=noexist # Cache chimp deps by running it without any tests
# Run meteor in parallel to chimp via ``post``
post:
- pwd
- date > ${CIRCLE_ARTIFACTS}/meteor.log
- cd src; meteor test --full-app --driver-package tmeasday:acceptance-test-driver --port 3100 >> ${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 3m
- cd src; chimp ./tests/_circle-ci-chimp-config.js --ddp=http://localhost:3100 --path=tests --mocha;
I am still in doubt that meteor is actually running, so I will now screw my improvised circle.yml and try to implement @sams DEV-branch… it looks much better and I am really starting to like this CI stuff, although all I am getting are some errors. But I am sure that in the end it will be a HUGE timesaver.
@sam: Can’t wait to see the meteor-guide-compatible version of your setup!
Guys: Thanks for your help so far
@Sam: just wondering: why are you guys using Karma on the client instead of a plain Mocha setup? I am sure it’s because Karma has some advantages - which are they?