1

我逐字逐句地关注文档Basic.spec.js,即以uiveri5 --debug(使用默认本地浏览器)开头,并在测试代码中的debugger;某些内容中声明。it()然而,测试运行通过,通过了该测试,并且不会在任何调试器中以任何方式停止。

conf.js

exports.config = {
  profile: "integration",
  specs: "./*spec.js",
  baseUrl: 'http://localhost:2027/...'
};

Basic.spec.js

describe('Basic', function () {
  it('1 should load the app', function() {
    expect(browser.getTitle()).toBe('Hurz,');
  });
  it('2 should open detail screen', function() {
    debugger;
    element(by.control({viewName: ..., id: ...})).click();
    let name = element(by.control({viewName: ..., id: ...}));
    expect(name.getText()).toBe("");
  });
})

安慰:

$ uiveri5 --debug
Starting uiveri5 with node arguments --inspect
Debugger listening on ws://127.0.0.1:9229/2584e64b-5d72-41f1-99ea-a51c8f073245
For help, see: https://nodejs.org/en/docs/inspector
INFO: @ui5/uiveri5 v1.41.2
INFO: Resolving specs
INFO: Check for latest major version of: chromedriver
(node:55071) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
INFO: Found latest major version of chromedriver: 79
INFO: Check for latest version of: chromedriver
INFO: Found latest version of chromedriver: 79.0.3945.36
INFO: Found correct binary locally: /usr/local/lib/node_modules/@ui5/uiveri5/selenium/chromedriver-79.0.3945.36
INFO: Executing 1 specs
[15:34:04] I/launcher - Running 1 instances of WebDriver
INFO: Suite started: Basic
INFO: Spec started: 1 should load the app
INFO: Opening: http://localhost:2027/...
INFO: UI5 Timestamp: 201910301504
INFO: Spec finished: 1 should load the app with status: PASSED
INFO: Spec started: 2 should open detail screen
INFO: Spec finished: 2 should open detail screen with status: PASSED
...

我错过了什么?

4

1 回答 1

2
  • 转到 chrome://inspect/#devices
  • 单击打开 Node 专用的 DevTools
  • 并运行 uiveri5 --debug 或 --inspect

更多参考在文档here (UIveri5)here (Node)

于 2020-01-28T14:35:19.670 回答