The spec stops running and hangs

非 Y 不嫁゛ 提交于 2021-02-11 15:10:23

问题


I've got a problem when using UIVeri5 to testing an app built by Fiori Elements. The test script is hanging there (for most of the time) at the first step until timeout. What's worse, I found in very rare case, it will succeed by passing the step. But the passing case cannot be easily reproduced.

Here is my partial_release.spec.js.

describe("partial_release", function () {
    it('should load the app', function() {
        debugger;
        expect(browser.getTitle()).toBe('Manage Security Deposits');
    });
});

The log stops like this:

INFO: @ui5/uiveri5 v1.45.1
INFO: Resolving specs
INFO: Executing 1 specs
[09:25:32] I/launcher - Running 1 instances of WebDriver
INFO: Opening webdriver connection with capabilities: {"browserName":"chrome","platform":"WINDOWS","chromeOptions":{"args":["--no-sandbox","--disable-dev-shm-usage","--disable-gpu","disable-infobars"]},"count":1}

DevTools listening on ws://127.0.0.1:49426/devtools/browser/df68f3f2-1258-4cd6-9009-0c3529cf8dfb
[21432:20908:1117/092535.616:ERROR:device_event_log_impl.cc(208)] [09:25:35.617] Bluetooth: bluetooth_adapter_winrt.cc:1166 RequestRadioAccessAsync failed: RadioAccessStatus::DeniedByUserWill not be able to change radio power.
INFO: Suite started: partial_release
INFO: Spec started: should load the app
INFO: Opening: https://xxxxxxx.wdf.sap.corp/ui?sap-client=725&sap-language=EN#CASecurityDeposit-manage

It will stops until timeout for most of times, although the app stops at the very first screen (the list page) with the title "Manage Security Deposits" shown on the tab.

Lucily, after hundreds of times experiments, I successfully catch one passed case. See logs in console below.

INFO: @ui5/uiveri5 
v1.45.1
INFO: Resolving specs
INFO: Found correct binary locally: C:/Users/I328007/Downloads/chromedriver.exe
[10:09:11] I/launcher - Running 1 instances of WebDriver
INFO: Opening webdriver connection with capabilities: {"browserName":"chrome","platform":"WINDOWS","chromeOptions":{"args":["--no-sandbox","--disable-dev-shm-usage","--disable-gpu","disable-infobars"]},"count":1}

DevTools listening on ws://127.0.0.1:53065/devtools/browser/52946d3e-9917-458b-a7b0-f073f0b55ef8
INFO: Suite started: partial_release
INFO: Spec started: should load the app
INFO: Opening: https://cc2-725.wdf.sap.corp/ui?sap-client=725&sap-language=EN#CASecurityDeposit-manage
[23780:22192:1117/100921.647:ERROR:device_event_log_impl.cc(208)] [10:09:21.647] Bluetooth: bluetooth_adapter_winrt.cc:1166 RequestRadioAccessAsync failed: RadioAccessStatus::DeniedByUserWill not be able to change radio power.
INFO: UI5 Version: 1.84.1-SNAPSHOT
INFO: UI5 Timestamp: 202011150553
INFO: Spec finished: should load the app with status: PASSED
INFO: Suite finished: partial_release with status: PASSED for: 57.762s
INFO: Suite specs summary, total: 2, passed: 2, failed: 0, pending: 0, disabled: 0
INFO: Suite expectations summary, total: 1, passed: 1, failed total: 0, failed with error: 0, failed with image comparison: 0
INFO: Overall status: PASSED for: 57.773s
INFO: Overall suites summary, total: 1, passed: 1, failed: 0
INFO: Overall specs summary, total: 2, passed: 2, failed: 0, pending: 0, disabled: 0
INFO: Overall expectations summary, total: 1, passed: 1, failed total: 0, failed with error: 0, failed with image comparison: 0
[10:10:15] I/launcher - 0 instance(s) of WebDriver still running
[10:10:15] I/launcher - chrome #01 passed

Does anyone have a similar issue?

来源:https://stackoverflow.com/questions/64868131/the-spec-stops-running-and-hangs

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!