Karma is not able to run test cases on phantomJS
See original GitHub issueI have been trying to get Karma to run tests on PhantomJS for the last couple of hours and seem to be stuck at it. I had my entire suit run tests in Chrome and it ran without a quirk. on trying to run it with Karma, it would just not run.
I was running phantomjs 1.9 and then i reverted to 1.8. i tried installing it from the distributed binary from the phantomjs site and i also tried to install it through npm. But i had no avail in any of the combinations. I am on a 64bit Ubuntu machine.
I am pretty sure my configurations are correct and i checked phantomjs which again seems to be working.
Am i missing something here. or is this some bizarre bug.
I am attaching my debug logs below.
DEBUG [reporter]: Using reporter "dots".
DEBUG [reporter]: Using reporter "junit".
INFO [karma]: Karma server started at http://localhost:9876/
INFO [launcher]: Starting browser PhantomJS
DEBUG [launcher]: Creating temp dir at /tmp/testacular-86450027
DEBUG [launcher]: phantomjs /tmp/testacular-86450027/capture.js
DEBUG [watcher]: Resolved files:
/home/kausikram/lib/node_modules/karma/adapter/lib/jasmine.js
/home/kausikram/lib/node_modules/karma/adapter/jasmine.js
/home/kausikram/Projects/scloud/src/main/webapp/resources/jquery/jquery.js
/home/kausikram/Projects/scloud/src/main/webapp/resources/jquery/jquery.dynoform.js
[...]
DEBUG [web server]: serving: /home/kausikram/lib/node_modules/karma/static/client.html
DEBUG [web server]: serving: /home/kausikram/lib/node_modules/karma/static/testacular.js
DEBUG [karma]: New browser has connected on socket s2jUXmnylvNYdQux4Wc2
WARN [launcher]: PhantomJS have not captured in 60000 ms, killing.
DEBUG [launcher]: Process PhantomJS exitted with code 1
ERROR [launcher]: Cannot start PhantomJS
DEBUG [launcher]: Cleaning temp dir /tmp/testacular-86450027
INFO [launcher]: Trying to start PhantomJS again.
DEBUG [launcher]: Creating temp dir at /tmp/testacular-86450027
DEBUG [launcher]: phantomjs /tmp/testacular-86450027/capture.js
DEBUG [web server]: serving: /home/kausikram/lib/node_modules/karma/static/client.html
DEBUG [web server]: serving: /home/kausikram/lib/node_modules/karma/static/testacular.js
DEBUG [karma]: New browser has connected on socket 3qsGGwLPK5ogNJs_4Wc3
WARN [launcher]: PhantomJS have not captured in 60000 ms, killing.
DEBUG [launcher]: Process PhantomJS exitted with code 1
ERROR [launcher]: Cannot start PhantomJS
Issue Analytics
- State:
- Created 10 years ago
- Comments:105 (10 by maintainers)
Top Results From Across the Web
Karma test fails when running on PhantomJS - Stack Overflow
The problem is that the test opens the Chrome, does something and close the browser. Now I want to change this implementation not...
Read more >Error with Karma test runner and PhantomJS
I've included "karma-phantomjs-launcher" and "karma-teamcity-reporter" plugins. I'm using the command line runner in my build step with the ...
Read more >Developers - Karma is not able to run test cases on phantomJS -
I have been trying to get Karma to run tests on PhantomJS for the last couple of hours and seem to be stuck...
Read more >Front-End Unit Testing Using Karma Test Runner
This tutorial shows how to write test specs for a sample project using Karma & Jasmine. You will also quickly learn how to...
Read more >Running tests with Karma and Jasmine manual
Make sure that Karma has the environmental variable of operating system. Create a file named karma.conf.js. To perform this, run karma init karma.conf.js ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey, all the people here: you are doing this so wrong!
The point is to test your app with Karma in real browsers, the one that your users use… unless you want your tests to have no value at all.
I solved this issue by reinstalling node_modules