2013-04-05 2 views
8

를 내가 얻을 다음 각 튜토리얼 (http://docs.angularjs.org/tutorial/step_03)의 엔드 - 투 - 엔드 테스트를 실행하려고 할 때 ...오류 실행 테스트, 스텝 3

내가 한 "자식 체크 아웃 -f 단계 -3 "그래서

[2013-04-05 07:17:07.774] [WARN] config - "/" is proxied, you should probably change urlRoot to avoid conflicts 
INFO [testacular]: Testacular server started at http://localhost:9876/ 
INFO [launcher]: Starting browser Chrome 
INFO [Chrome 26.0 (Mac)]: Connected on socket id CamYxe8MuPk52Agq6g5L 
WARN [proxy]: failed to proxy /app/index.html (Error: connect ECONNREFUSED) 
WARN [proxy]: failed to proxy /app/index.html (Error: connect ECONNREFUSED) 

나는 그래서 난에 testacula의 설정을 변경 포트 3000 에에 WEBrick에서 제공되고있는 레일 애플 리케이션 내부 응용 프로그램을 실행하는거야 ... 바로의 repo에서의 .. .

proxies = { 
'/': 'http://localhost:3000/' 
}; 

... 다음 테스트 실행되지만

Chrome 26.0 (Mac) PhoneCat App Phone list view should filter the phone list as user types into the search box FAILED 
expect repeater '.phones li' count toBe 3 
/Users/paul/rails_projects/angularjs/public/angular-phonecat/test/e2e/scenarios.js:15:7: expected 3 but was 0 

실패 그래서 제대로 페이지로 이동 아니에요 보인다. 누구나 아이디어가 있으십니까? 이것에

건배

답변

4

업데이트하여 각-phonecat/설정/testacular-e2e.conf.js 프록시 :

proxies = { 
    '/': 'http://localhost:3000/angular-phonecat/' 
}; 

각도-phonecat의 시험/검사/E2E/scenarios.js은

http://localhost:3000/app/index.html 

이 (또는 사용자/모든 파일을 이동할 수있는 해결됩니다 위의 구성에 프록시를 업데이트/폴/rails_projects/AngularJS와/공공/각-phonecat/* 무서운 : 도달 할 수있을 것으로 기대 크리스으로

1

가 말했다 ctly) 공용 폴더에 (내가 올렸 그의 코멘트) 내가 MAMP를 실행하고

은 그래서 포트를 사용하도록 변경했다 :/각도-phonecat 80

+0

감사 형제, 난 문제가 포트에 주목! :디 – GusDeCooL

1

당신이 만약 E2E 설정 파일 8000가 올바른 포트가

→ ./scripts/web-server.js 
Http Server running at http://localhost:8000/ 

공지 있고 업데이트 :

를 단순히 스크립트/웹 server.js를 실행하는 것은 다음 바로 서버를 실행
// config/karma-e2e.conf.js 

proxies: { 
    '/': 'http://localhost:8000/' //was :3000 
} 

지금 E2E 테스트를 실행하고 그것을 잘해야한다 :

→ karma start config/karma-e2e.conf.js