我从shippable得到的错误看起来像这样
Failures:
1) homepage should have the name of the app in the navbar
Message:
Error: Error while running testForAngular: Timed out waiting for async script result after 11002ms
Command duration or timeout: 11.13 seconds
Build info: version: '2.40.0', revision: 'fbe29a9', time: '2014-02-19 20:54:28'
System info: host: '61185b2d1026', ip: '172.17.18.4', os.name: 'Linux', os.arch: 'amd64', os.version: '3.13.0-32-generic', java.version: '1.7.0_67'
Session ID: 71602336-8ec6-44bd-a755-9fc82da1d337
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{platform=LINUX, acceptSslCerts=true, javascriptEnabled=true, cssSelectorsEnabled=true, databaseEnabled=true, browserName=firefox, handlesAlerts=true, browserConnectionEnabled=true, webStorageEnabled=true, nativeEvents=false, rotatable=false, locationContextEnabled=true, applicationCacheEnabled=true, takesScreenshot=true, version=29.0}]
Stacktrace:
Error: Error while running testForAngular: Timed out waiting for async script result after 11002ms
Command duration or timeout: 11.13 seconds
Build info: version: '2.40.0', revision: 'fbe29a9', time: '2014-02-19 20:54:28'
System info: host: '61185b2d1026', ip: '172.17.18.4', os.name: 'Linux', os.arch: 'amd64', os.version: '3.13.0-32-generic', java.version: '1.7.0_67'
Session ID: 71602336-8ec6-44bd-a755-9fc82da1d337
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{platform=LINUX, acceptSslCerts=true, javascriptEnabled=true, cssSelectorsEnabled=true, databaseEnabled=true, browserName=firefox, handlesAlerts=true, browserConnectionEnabled=true, webStorageEnabled=true, nativeEvents=false, rotatable=false, locationContextEnabled=true, applicationCacheEnabled=true, takesScreenshot=true, version=29.0}]
at Error ()
==== async task ====
WebDriver.executeScript()
at [object Object]. (/home/shippable/workspace/src/github.com/tipfortip/www/public/index-spec.js:4:13)
==== async task ====
Asynchronous test function: it()
Error
at [object Object]. (/home/shippable/workspace/src/github.com/tipfortip/www/public/index-spec.js:3:3)
at Object. (/home/shippable/workspace/src/github.com/tipfortip/www/public/index-spec.js:1:63)
2) homepage should have the name of the app in the footer
Message:
Error: Angular could not be found on the page http://localhost:8000/ : angular never provided resumeBootstrap
Stacktrace:
Error: Angular could not be found on the page http://localhost:8000/ : angular never provided resumeBootstrap
==== async task ====
WebDriver.executeScript()
at [object Object]. (/home/shippable/workspace/src/github.com/tipfortip/www/public/index-spec.js:14:13)
==== async task ====
Asynchronous test function: it()
Error
at [object Object]. (/home/shippable/workspace/src/github.com/tipfortip/www/public/index-spec.js:13:3)
at Object. (/home/shippable/workspace/src/github.com/tipfortip/www/public/index-spec.js:1:63)
我可以在计算机上使用Firefox和Chrome成功运行测试。
答案 0 :(得分:0)
出于某种原因,Shippable系统无法识别我的文档正在进行的引导。需要将其添加到正在解析的页面的HTML中。
angular.element(document).ready -> angular.bootstrap document, ['foo']
无效,需要
<!DOCTYPE html>
<html data-ng-app="foo">