【问题标题】:angular2 protractor: npm e2e failed - A Jasmine spec timed out. Resetting the WebDriver Control Flowangular2 protractor: npm e2e failed - Jasmine 规范超时。重置 WebDriver 控制流
【发布时间】:2016-09-19 16:05:31
【问题描述】:

我成功地使用了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

有什么想法吗?

【问题讨论】:

    标签: angular protractor


    【解决方案1】:

    在进行e2e测试时需要在端口8080上运行Web应用程序或运行npm start以找到Web应用程序端口,即3000然后将protractor.config.jsbaseUrl更改为该端口:

    // Base URL for application server
      baseUrl: 'http://localhost:3000',
    

    【讨论】:

      猜你喜欢
      • 2015-05-14
      • 2019-10-31
      • 1970-01-01
      • 1970-01-01
      • 2015-08-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-08-17
      相关资源
      最近更新 更多