Funcunit 的打开导致在线 CI 服务出现问题,例如 Travis 和 CircleCI
Funcunit's open is causing trouble in online CI services such as Travis and CircleCI
我在控制台上有一个 donejs 插件 (https://github.com/riescorp/donejs-typeahead) and I decided to use funcunit (http://funcunit.com/) to do the GUI interaction tests. Everything works fine on my computer, either running the test page (http://localhost:8080/test/test.html) 或 运行ning npm test
。
问题是当运行在 CircleCI 或 Travis CI 上测试时,测试不会通过。错误类似于 "xxxxx page not loaded in time!"(请参见下面的示例)。
有一个简化的分支来显示正在发生的事情(https://github.com/riescorp/donejs-typeahead/tree/testing-open),你可以克隆它,然后 运行 npm install
和 npm test
你会看到它有效。
您可以在此处查看 CircleCI 中错误的详细信息:
- https://circleci.com/gh/riescorp/donejs-typeahead/tree/testing-open
- https://circleci.com/gh/riescorp/donejs-typeahead/74(样本)
Travis 生成相同的错误,但它会失败,因为我正在测试 firefox 和 chrome(Travis 不支持 chrome)
示例错误:
1) QUnit "test/test.html" on Chrome 53.0.2785 / Linux 0.0.0: donejs-typeahead GUI Interaction DEBUG TESTS DEBUG 1 Page //../src/donejs-typeahead.html not loaded in time!:
Error: Expected true but was false
at Object.ok (http://localhost:3996/node_modules/steal-qunit/node_modules/qunitjs/qunit/qunit.js:2194:12)
at Object.assertOK (http://localhost:3996/node_modules/funcunit/browser/adapters/qunit.js:12:10)
at http://localhost:3996/node_modules/funcunit/browser/queue.js:168:27
我在控制台上有一个 donejs 插件 (https://github.com/riescorp/donejs-typeahead) and I decided to use funcunit (http://funcunit.com/) to do the GUI interaction tests. Everything works fine on my computer, either running the test page (http://localhost:8080/test/test.html) 或 运行ning npm test
。
问题是当运行在 CircleCI 或 Travis CI 上测试时,测试不会通过。错误类似于 "xxxxx page not loaded in time!"(请参见下面的示例)。
有一个简化的分支来显示正在发生的事情(https://github.com/riescorp/donejs-typeahead/tree/testing-open),你可以克隆它,然后 运行 npm install
和 npm test
你会看到它有效。
您可以在此处查看 CircleCI 中错误的详细信息:
- https://circleci.com/gh/riescorp/donejs-typeahead/tree/testing-open
- https://circleci.com/gh/riescorp/donejs-typeahead/74(样本)
Travis 生成相同的错误,但它会失败,因为我正在测试 firefox 和 chrome(Travis 不支持 chrome)
示例错误:
1) QUnit "test/test.html" on Chrome 53.0.2785 / Linux 0.0.0: donejs-typeahead GUI Interaction DEBUG TESTS DEBUG 1 Page //../src/donejs-typeahead.html not loaded in time!:
Error: Expected true but was false
at Object.ok (http://localhost:3996/node_modules/steal-qunit/node_modules/qunitjs/qunit/qunit.js:2194:12)
at Object.assertOK (http://localhost:3996/node_modules/funcunit/browser/adapters/qunit.js:12:10)
at http://localhost:3996/node_modules/funcunit/browser/queue.js:168:27