continuous-integration - 类型错误 : null is not an object (evaluating 'document.body.querySelector(' . 警报 > .bar.passed').innerText')

标签 continuous-integration jasmine phantomjs teamcity-8.0

出于某种原因,我在运行(或至少报告运行)我的 jasmine 测试时出现间歇性故障。错误在于 run-jasmine.js 并且错误表现为

`TypeError: null is not an object (evaluating 'document.body.querySelector('.alert > .bar.passed').innerText')
phantomjs://webpage.evaluate():58
phantomjs://webpage.evaluate():61` 

我正在运行 TeamCity 8.1.3(内部版本 30101)、Jasmine 2.2.0 和 phantomjs 2.0.0。
构建步骤命令参数是
--web-security=no
--local-to-remote-url-access=yes
--ignore-ssl-errors=yes
jasmine/run-jasmine.js
specs/SpecsRunner.html

我试过降级 Jasmine 和 phantomjs 但没有改变。我也尝试过各种 run-jasmine.js 脚本,但都无济于事。有没有其他人有类似的问题?

直到几天前一切都很好,现在它发生了 90% 的时间。

提前致谢。

最佳答案

我找到了一个新的 run-jasmine.js 脚本来完成这项工作。

daniel-chambers / run-jasmine.js

我之前尝试过这个脚本,但遇到超时问题,所以我继续前进,但现在我已将脚本中的“默认最大超时”增加到 60 秒,它似乎可以很好地解决问题。

关于continuous-integration - 类型错误 : null is not an object (evaluating 'document.body.querySelector(' . 警报 > .bar.passed').innerText'),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29095692/

相关文章:

continuous-integration - 如何在 Github Actions 上使用 Yarn 3.5 版? ("Error: cannot find module .../yarn-3.5.0.cjs")

javascript - Jasmine 在浏览器中传递,文件在 grunt-contrib-jasmine 中

javascript - Jasmine - 如何编写自定义匹配器来求和两个数字?

javascript - Angular Jasmine : testing component that draws dom using timeout

javascript - 有 promise 的 Node 骑士

javascript - 如何在 CasperJS 中的多个页面上进行嵌套循环

php - 在 OS X 中将 PhantomJS 作为守护进程运行

continuous-integration - 如何重试失败的测试?

continuous-integration - 发布分支和持续交付

java - Hudson 和 maven-release-plugin