如何调试Karma runner vs PhantomJS浏览器的启动?

时间:2016-03-26 08:15:48

标签: unit-testing phantomjs karma-runner

使用Karma runner + PhantomJS浏览器运行单元测试时遇到问题。

Karma服务器启动,然后PhantomJS浏览器启动,然后没有任何反应。 1分钟后,我收到的信息是60年代没有人被捕,杀人过程。

[11:08:35][Step 3/5] Running "karma:allTests" (karma) task
[11:08:36][Step 3/5] 26 03 2016 11:08:36.520:WARN [watcher]: Pattern "/export/home/bc_prod1/buildAgent1/work/dac7c6b3e0abf1a1/test/fixtures/*.json" does not match any file.
[11:08:41][Step 3/5] 26 03 2016 11:08:41.077:INFO [karma]: Karma v0.13.21 server started at http://localhost:9876/
[11:08:41][Step 3/5] 26 03 2016 11:08:41.084:INFO [launcher]: Starting browser PhantomJS
[11:09:41][Step 3/5] 26 03 2016 11:09:41.085:WARN [launcher]: PhantomJS have not captured in 60000 ms, killing.
[11:09:43][Step 3/5] 26 03 2016 11:09:43.087:WARN [launcher]: PhantomJS was not killed in 2000 ms, sending SIGKILL.
[11:09:45][Step 3/5] 26 03 2016 11:09:45.087:WARN [launcher]: PhantomJS was not killed by SIGKILL in 2000 ms, continuing.
[11:09:45][Step 3/5] Warning: Task "karma:allTests" failed.  Use --force to continue.

我不知道为什么不开始。我怎么可以调试这个问题?我不知道。

操作系统是redhat6。

1 个答案:

答案 0 :(得分:1)

不同版本的karma-phantomjs-launcher和phantomjs-prebuilt存在一些不兼容问题。

尝试降级你的phantomjs-prebuilt版本。