业力测试运行器-无法捕获Chrome [英] Karma test runner - fails to capture chrome

查看:121
本文介绍了业力测试运行器-无法捕获Chrome的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Yeoman生成AngularJS应用.运行grunt serve以预览我的应用程序可以正常工作,但是当我尝试使用grunt test运行测试时,在控制台上出现以下错误:

I'm using Yeoman to generate an AngularJS app. Running the grunt serve to preiview my app works fine, but when i try to run the tests using grunt test I get the following error on my console:

Running "karma:unit" (karma) task
DEBUG [plugin]: Loading karma-* from D:\dev\wamp\www\tests\app\node_modules
DEBUG [plugin]: Loading plugin D:\dev\wamp\www\tests\app\node_modules/karma-chrome-launcher.
DEBUG [plugin]: Loading plugin D:\dev\wamp\www\tests\app\node_modules/karma-coffee-preprocessor.
DEBUG [plugin]: Loading plugin D:\dev\wamp\www\tests\app\node_modules/karma-firefox-launcher.
DEBUG [plugin]: Loading plugin D:\dev\wamp\www\tests\app\node_modules/karma-html2js-preprocessor.
DEBUG [plugin]: Loading plugin D:\dev\wamp\www\tests\app\node_modules/karma-jasmine.
DEBUG [plugin]: Loading plugin D:\dev\wamp\www\tests\app\node_modules/karma-ng-html2js-preprocessor.
DEBUG [plugin]: Loading plugin D:\dev\wamp\www\tests\app\node_modules/karma-ng-scenario.
DEBUG [plugin]: Loading plugin D:\dev\wamp\www\tests\app\node_modules/karma-phantomjs-launcher.
DEBUG [plugin]: Loading plugin D:\dev\wamp\www\tests\app\node_modules/karma-requirejs.
DEBUG [plugin]: Loading plugin D:\dev\wamp\www\tests\app\node_modules/karma-script-launcher.
INFO [karma]: Karma v0.10.8 server started at http://localhost:8080/
INFO [launcher]: Starting browser Chrome
DEBUG [launcher]: Creating temp dir at C:\Users\shlomis\AppData\Local\Temp\karma-91802655
DEBUG [launcher]: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe --user-data-dir=C:\Users\shlomis\AppData\Local\Temp\karma-91802655 --no-default-browser-check --no-first-run --disable-def
ault-apps --start-maximized http://localhost:8080/?id=91802655
WARN [watcher]: Pattern "D:/dev/wamp/www/tests/app/test/mock/**/*.js" does not match any file.
DEBUG [watcher]: Resolved files:
        D:/dev/wamp/www/tests/app/node_modules/karma-jasmine/lib/jasmine.js
        D:/dev/wamp/www/tests/app/node_modules/karma-jasmine/lib/adapter.js
        D:/dev/wamp/www/tests/app/app/bower_components/angular/angular.js
        D:/dev/wamp/www/tests/app/app/bower_components/angular-mocks/angular-mocks.js
        D:/dev/wamp/www/tests/app/app/scripts/app.js
        D:/dev/wamp/www/tests/app/app/scripts/controllers/main.js
        D:/dev/wamp/www/tests/app/test/spec/controllers/main.js
DEBUG [web-server]: serving: D:\dev\wamp\www\tests\app\node_modules\karma\static/client.html
DEBUG [web-server]: serving: D:\dev\wamp\www\tests\app\node_modules\karma\static/karma.js
DEBUG [karma]: A browser has connected on socket 1ozU-x__3w49R5zevWXm
WARN [launcher]: Chrome have not captured in 60000 ms, killing.
Warning: Task "karma:unit" failed. Use --force to continue.

Aborted due to warnings.

  • 节点v0.10.23
  • 业力版本:0.10.8
  • 我想念什么?

    推荐答案

    将karma.conf.js文件中的默认端口(8080)更改为 9876 为我解决了该问题

    Changing the default port (8080) to 9876 in karma.conf.js file solved the issue for me

    这篇关于业力测试运行器-无法捕获Chrome的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆