Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

node.js/karma/end-to-end testing: failed to proxy /app/index.html (Error: connect ECONNREFUSED)

The following are messages I'm getting while trying to run end-to-end test from AngularJS tutorial http://docs.angularjs.org/tutorial/step_05 on MS Windows 8 Professional. Could you please advise how can I make this test running well?

[2013-06-10 17:27:54.100] [WARN] config - "/" is proxied, you should probably change urlRoot to avoid conflicts
INFO [karma]: Karma server started at http://localhost:9876/
INFO [launcher]: <<< Starting browser Chrome
INFO [launcher]: --- Starting browser Chrome
INFO [Chrome 27.0 (Windows)]: Connected on socket id E20UigDmDqhk3jaRRYAP
WARN [proxy]: failed to proxy /app/index.html (Error: connect ECONNREFUSED)

ECONNREFUSED while running end-to-end test using Karma node.js package on MS Windows 8 Professional

like image 605
ShamilS Avatar asked Jun 10 '13 13:06

ShamilS


1 Answers

The error you're seeing indicates that you haven't started the webserver. Since you are using ./scripts/e2e-test.sh to run your e2e tests, you need to have your webserver serve the app from localhost:8000 and the docroot needs point to the angular-phonecat folder, not the app folder. This can be done by simply running ./scripts/web-server.js (see step-00)

Note that there is a second way to run your e2e tests. You can just visit

http://localhost:8000/test/e2e/runner.html 
like image 56
Thanh Nguyen Avatar answered Oct 16 '22 19:10

Thanh Nguyen