繁体   English   中英

运行基于Jasmine和Selenium-Webdriver的测试时出错

[英]Error when running jasmine and selenium-webdriver based tests

我正在使用硒webdriver和茉莉花为我的网站创建一些端到端测试。 我尝试搜索好的初学者教程。 我最终完成了本教程该教程帮助我逐步进行了运行端到端测试的步骤。 我尝试完全按照其中描述的方法(包括相同的目录名)进行操作。 我正在使用Chrome浏览器并安装了chromedriver。 当我使用运行测试时

$ jasmine spec\integration-test.js

如此处所述,我收到许多超时错误,如下所示。 它还打开两个带有data:, Chrome窗口data:,作为URL。 我花了一些时间试图弄清楚,但似乎没有进展。 任何帮助,将不胜感激。 请让我知道是否需要更多信息。

Started
FF

Failures:
1) Selenium Tutorial Should be on the home page
  Message:
    Error: Timeout - Async callback was not invoked within timeout specified by
jasmine.DEFAULT_TIMEOUT_INTERVAL.
  Stack:
    Error: Timeout - Async callback was not invoked within timeout specified by
jasmine.DEFAULT_TIMEOUT_INTERVAL.
        at Timer.listOnTimeout [as ontimeout] (timers.js:121:15)
  Message:
    Error: Timeout - Async callback was not invoked within timeout specified by
jasmine.DEFAULT_TIMEOUT_INTERVAL.
  Stack:
    Error: Timeout - Async callback was not invoked within timeout specified by
jasmine.DEFAULT_TIMEOUT_INTERVAL.
        at Timer.listOnTimeout [as ontimeout] (timers.js:121:15)
  Message:
    Error: Timeout - Async callback was not invoked within timeout specified by
jasmine.DEFAULT_TIMEOUT_INTERVAL.
  Stack:
    Error: Timeout - Async callback was not invoked within timeout specified by
jasmine.DEFAULT_TIMEOUT_INTERVAL.
        at Timer.listOnTimeout [as ontimeout] (timers.js:121:15)

2) Selenium Tutorial Has a working nav
  Message:
    Error: Timeout - Async callback was not invoked within timeout specified by
jasmine.DEFAULT_TIMEOUT_INTERVAL.
  Stack:
    Error: Timeout - Async callback was not invoked within timeout specified by
jasmine.DEFAULT_TIMEOUT_INTERVAL.
        at Timer.listOnTimeout [as ontimeout] (timers.js:121:15)
  Message:
    Error: Timeout - Async callback was not invoked within timeout specified by
jasmine.DEFAULT_TIMEOUT_INTERVAL.
  Stack:
    Error: Timeout - Async callback was not invoked within timeout specified by
jasmine.DEFAULT_TIMEOUT_INTERVAL.
        at Timer.listOnTimeout [as ontimeout] (timers.js:121:15)
  Message:
    Error: Timeout - Async callback was not invoked within timeout specified by
jasmine.DEFAULT_TIMEOUT_INTERVAL.
  Stack:
    Error: Timeout - Async callback was not invoked within timeout specified by
jasmine.DEFAULT_TIMEOUT_INTERVAL.
        at Timer.listOnTimeout [as ontimeout] (timers.js:121:15)

将此添加到您的茉莉花配置:(根据需要增加)

"default_timeout_interval": 5000

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM