我成功使用npm test
,但仍无法为项目angular2-quickstart运行npm e2e
Chrome实例显示为禁用开发者模式扩展几秒钟,然后输出错误。
> angular2-quickstart@1.0.0 e2e c:\Users\xxx\Source\Repos\my-proj
> tsc && concurrently "http-server -s" "protractor protractor.config.js" --kill-
others --success first
[1] [12:29:33] I/direct - Using ChromeDriver directly...
[1] [12:29:33] I/launcher - Running 1 instances of WebDriver
[1] AppDir: ./
[1] Suite: QuickStart E2E Tests
[1] A Jasmine spec timed out. Resetting the WebDriver Control Flow.
[1] failed - should display: My First Angular 2 App
[1] Suite failed: QuickStart E2E Tests
[1] [12:29:48] I/launcher - 0 instance(s) of WebDriver still running
[1] [12:29:48] I/launcher - chrome #01 failed 1 test(s)
[1] [12:29:48] I/launcher - overall: 1 failed spec(s)
[1] [12:29:48] E/launcher - Process exited with error code 1
[1] protractor protractor.config.js exited with code 1
--> Sending SIGTERM to other processes..
[0] http-server -s exited with code 1
请问好吗?
答案 0 :(得分:0)
需要在执行e2e测试时在端口8080上运行的Web应用程序或运行http://myurl/anything/limit.action -> still works which is wrong too
以查找Web应用程序端口,即npm start
然后将3000
baseUrl更改为该端口:
protractor.config.js