I have a command-line-only Ubuntu 11.04 (GNU/Linux 2.6.35.4-rscloud x86_64) and I'm working through the Angular Phonecat tutorial which uses the Karma for testing. The Karma browser config page says Chrome launcher is "shipped with Karma by default."
But it's not working for me. This is the karma.conf.js. Below is the output.
$ ./scripts/test.sh
Starting Karma Server (http://karma-runner.github.io)
-------------------------------------------------------------------
INFO [karma]: Karma v0.10.4 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
ERROR [launcher]: Cannot start Chrome
Can not find the binary google-chrome
Please set env variable CHROME_BIN
This answer points out that I need chromium.
So I tried to install Chrome on my Ubuntu with this guide with "download 64 bit version using command line". Everything went well until sudo apt-get -f install
, which ended with a lot of "failed to fetch" from ubuntu IP addresses, such as 91.189.91.15 or 91.189.92.. Even with /usr/bin/googlesomething* that the "Can not find the binary google-chrome" goes away, I still got the "Cannot start Chrome" on the individual test level. Then while trying to fix errors, I deleted /usr/bin/googlesomething.
Currently, I have these node_modules:
angular-phonecat/node_modules$ ls
karma karma-html2js-preprocessor karma-requirejs
karma-chrome-launcher karma-jasmine karma-script-launcher
karma-coffee-preprocessor karma-junit-reporter
karma-firefox-launcher karma-phantomjs-launcher
Q 1: Since my machine has only command-line access, no GUI, is the other Karma launcher, PhantomJS, a better choice than Chrome/Chromium?
Q 2: If I should still use Chrome/Chromium, should I get Chrome or Chromium?
Q 3: Does anyone know what exactly do I need to get google-chrome or chromium for Karma to work in the Angular app?