【问题标题】:Debugging Tests - Getting Testem/Qunit from closing test browser window调试测试 - 从关闭测试浏览器窗口中获取 Testem/Qunit
【发布时间】:2014-01-28 11:14:57
【问题描述】:

好的,我正在使用 Ember-App-Kit,它使用 Testem/Qunit,但我不知道如何调试测试,尤其是因为 Testem 或 Qunit 关闭了 QUnit 测试窗口,所以我无法设置任何断点,和 node debugdebugger 不起作用,因为它在浏览器中。

我尝试在grunt-contrib-testem 中设置debug: true 属性,但没有做任何事情..

因此,如果有人可以提供帮助,那就太好了。我正在使用默认的 EAK 设置,没有任何更改。

【问题讨论】:

    标签: testing ember.js qunit acceptance-testing ember-app-kit


    【解决方案1】:

    你需要做一些事情:

    1. grunt server 任务在一个窗口中运行 - 这将重建您的测试资产并将它们编译到 build/test 目录中。
    2. 在独立模式下运行 Testem -- 您首先必须通过 npm (npm install -g testem) 安装 testem,然后从应用的根目录调用 testem。或者,您可以运行 grunt test:server,这样您就可以运行 testem 而无需全局安装。
    3. 在您的test 正文中删除debugger 语句。在运行 Testem 工具的打开的 Chrome 窗口中,打开您的开发者工具控制台窗口。
    4. 刷新 Chrome 窗口,您现在将在测试中拥有断点功能。

    【讨论】:

      猜你喜欢
      • 2020-07-06
      • 2013-12-11
      • 2014-04-28
      • 1970-01-01
      • 1970-01-01
      • 2010-10-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多