casperjs测试冷冻导致jenkins生成超时

我在分期环境中与詹金斯进行casperjs测试。 最近jenkins已经超时(在10分钟),并且几乎总是因为casper测试。 套件中有4个测试,平均成功构建大约需要1分30秒。

当我在本地运行单独的测试时,我有时可以重现这一点 - casper似乎只是卡住了。 一个值得注意的事情是它似乎总是在加载新页面的操作上(URL更改)。

这里是一个非常简单的登录测试日志:

[info] [phantom] Starting...
[info] [phantom] Running suite: 12 steps
[debug] [phantom] opening url: http://mytestsite.dev/log_in, HTTP GET
[debug] [phantom] Navigation requested: url=http://mytestsite.dev/log_in, type=Other, willNavigate=true, isMainFrame=true
[debug] [phantom] url changed to "http://mytestsite.dev/log_in"
[debug] [phantom] Successfully injected Casper client-side utilities
[debug] [phantom] start page is loaded
[info] [phantom] Step anonymous 3/12 http://mytestsite.dev/log_in (HTTP 200)
logging in
[info] [remote] attempting to fetch form element from selector: '#login_form'
[debug] [remote] Set "email" field value to test.user@gmail.com
[debug] [remote] Set "password" field value to ***********
[info] [phantom] Step anonymous 3/12: done in 445ms.
[info] [phantom] Step anonymous 4/12 http://mytestsite.dev/log_in (HTTP 200)
[debug] [phantom] Mouse event 'mousedown' on selector: xpath selector: //*[@id="login_form"]/span[3]/input
[debug] [phantom] Mouse event 'mouseup' on selector: xpath selector: //*[@id="login_form"]/span[3]/input
[debug] [phantom] Mouse event 'click' on selector: xpath selector: //*[@id="login_form"]/span[3]/input
[info] [phantom] Step anonymous 4/12: done in 466ms.
[debug] [phantom] Navigation requested: url=http://mytestsite.dev/log_in, type=FormSubmitted, willNavigate=true, isMainFrame=true
[debug] [phantom] Navigation requested: url=http://mytestsite.dev/home, type=FormSubmitted, willNavigate=true, isMainFrame=true
[debug] [phantom] url changed to "http://mytestsite.dev/home"

它冻结,然后构建超时。 这在过去几周里开始发生。

[编辑]也可以得到这个间歇性地发生,当我尝试运行这个测试 - https://gist.github.com/n1k0/4509789

关于如何调试的任何想法?

链接地址: http://www.djcxy.com/p/73479.html

上一篇: casperjs tests freezing causing jenkins build to time out

下一篇: Check/Log how much bandwidth PhantomJS/CasperJS used