首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何调试uiveri5测试?

如何调试uiveri5测试?
EN

Stack Overflow用户
提问于 2020-01-24 14:45:05
回答 1查看 482关注 0票数 1

我逐字逐句地遵循医生们,即用uiveri5 --debug (使用默认的本地浏览器)启动Basic.spec.js,并在测试代码中的某些it()中有一个debugger;语句。然而,测试通过了测试,并且不会在任何调试器中以任何方式停止。

conf.js

代码语言:javascript
复制
exports.config = {
  profile: "integration",
  specs: "./*spec.js",
  baseUrl: 'http://localhost:2027/...'
};

Basic.spec.js

代码语言:javascript
复制
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("");
  });
})

控制台:

代码语言:javascript
复制
$ 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
...

我遗漏了什么?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-01-28 14:35:19

  • 转到铬://检查/#设备
  • 单击打开节点的专用DevTools
  • 然后运行uiveri5 --调试或检查

更多参考资料见文档这里(UIveri5)这里(节点)

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59898696

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档