5
votes

Windows 8 64bit

Node.js 0.10.5 64bit

Karma 0.8.5

I am able to start karma server, Chrome browser opens (I have it defined as default browser in karma config). The issue comes when I am doing 'karma run'. Chrome changes the tab status to Chrome 26.0 (Windows) is executing. But that is all, no output on the console, no nothing. it can stay like that for hours.

Any ideas?

EDIT

I have the follwoing gists: karma.conf.js and main.js (used for loading the test scripts). I am starting the server with LOG_DEBUG and I can see that all script files are loaded. Gist url: https://gist.github.com/mihaihuluta/5490991

2
Can you show your config file? Also please put verbose logging - smk
I have updated the question. - Mihai H
Does it work if instead of using karma run, you set singleRun = true? - Jmr
Same issue as before. Now I have singleRun = true,Chrome browser is opened with tab status Chrome 26.0 (Windows) is executing, but that is all. It just hangs in there doing nothing I assume. - Mihai H
Same thing applies to Phantomjs browser. - Mihai H

2 Answers

5
votes

I personally found that if you have require.js...

frameworks: ['jasmine', 'requirejs'],

...when you don't need it, things will just lock up at "executing..." in all browsers.

Also make sure you've specifed your adapters, eg.

files: [
    //adapter
    JASMINE, 
    JASMINE_ADAPTER,
    //...other files...
    'test/client/*.js'
]

Finally, I use

logLevel: config.LOG_DEBUG

and

browsers: ['Chrome'] //only one

...to ensure I have the simplest test case and am getting all debug information for any failures.

0
votes

What have described in the previous post (about not being able to run karma) was just a hack. Today I decided to pay more attention to details (as I should have done in the first place) and ques what...I managed to have it up and running using a much more elegant and official way. First I have uninstalled node.js 0.10.5 64bit and installed node.js 0.10.5 x86. When I have installed karma first time I used the following command npm install karma where the correct command would be npm install -g karma in order to have it installed globally. Once installed I added the appropriate environment variables (CHROME_BIN and PHANOMJS_BIN) with the correct paths and voila! All is running just fine.

That's from the blog that went down :).