SAP / ui5-uiveri5

End-to-end testing framework for SAPUI5
Apache License 2.0
120 stars 56 forks source link

Timeout issue #284

Open myselfdeepz opened 3 years ago

myselfdeepz commented 3 years ago

Hello Team,

We are facing timeout issues while running Uiveri5 tests.

info uiVeri5ExecuteTests - A Jasmine spec timed out. Resetting the WebDriver Control Flow. 17:07:03 info uiVeri5ExecuteTests - INFO: Expectation FAILED: Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL. 17:08:11 error uiVeri5ExecuteTests - ERROR: Error while taking report screenshot: TimeoutError: timeout: Timed out receiving message from renderer: 10.000 17:08:11 info uiVeri5ExecuteTests - (Session info: chrome=75.0.3770.90) 17:08:11 info uiVeri5ExecuteTests - (Driver info: chromedriver=75.0.3770.90,platform=Linux 4.19.123-coreos x86_64)

tsaleksandrova commented 3 years ago

can you show us the full stack trace, with verbose mode (-v), as the screenshot message points to a browser session issue

myselfdeepz commented 3 years ago

@tsaleksandrova Please find the logs

00:22:58 info uiVeri5ExecuteTests - INFO: Spec started: create and navigate to digital twin app 00:22:58 error uiVeri5ExecuteTests - ERROR: Error while taking report screenshot: WebDriverError: unknown error: cannot activate web view 00:22:58 info uiVeri5ExecuteTests - (Session info: chrome=75.0.3770.90) 00:22:58 info uiVeri5ExecuteTests - (Driver info: chromedriver=75.0.3770.90 (a6dcaf7e3ec6f70a194cc25e8149475c6590e025-refs/branch-heads/3770@{#1003}),platform=Linux 4.19.123-coreos x86_64) 00:29:04 info uiVeri5ExecuteTests - A Jasmine spec timed out. Resetting the WebDriver Control Flow. 00:29:04 info uiVeri5ExecuteTests - A Jasmine spec timed out. Resetting the WebDriver Control Flow. 00:29:04 info uiVeri5ExecuteTests - A Jasmine spec timed out. Resetting the WebDriver Control Flow. 00:29:04 info uiVeri5ExecuteTests - INFO: Expectation FAILED: Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL. 00:29:04 info uiVeri5ExecuteTests - DEBUG: Expectation FAILED stack: Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL. 00:29:04 info uiVeri5ExecuteTests - at Timeout._onTimeout (/home/node/.npm-global/lib/node_modules/@ui5/uiveri5/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4281:23) 00:29:04 info uiVeri5ExecuteTests - at listOnTimeout (internal/timers.js:554:17) 00:29:04 info uiVeri5ExecuteTests - at processTimers (internal/timers.js:497:7) 00:29:04 info uiVeri5ExecuteTests - INFO: Expectation FAILED: Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL. 00:29:04 info uiVeri5ExecuteTests - DEBUG: Expectation FAILED stack: Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL. 00:29:04 info uiVeri5ExecuteTests - at Timeout._onTimeout (/home/node/.npm-global/lib/node_modules/@ui5/uiveri5/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4281:23) 00:29:04 info uiVeri5ExecuteTests - at listOnTimeout (internal/timers.js:554:17) 00:29:04 info uiVeri5ExecuteTests - at processTimers (internal/timers.js:497:7) 00:29:04 info uiVeri5ExecuteTests - INFO: Expectation FAILED: Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL. 00:29:04 info uiVeri5ExecuteTests - DEBUG: Expectation FAILED stack: Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL. 00:29:04 info uiVeri5ExecuteTests - at Timeout._onTimeout (/home/node/.npm-global/lib/node_modules/@ui5/uiveri5/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4281:23) 00:29:04 info uiVeri5ExecuteTests - at listOnTimeout (internal/timers.js:554:17) 00:29:04 info uiVeri5ExecuteTests - at processTimers (internal/timers.js:497:7) 00:29:04 info uiVeri5ExecuteTests - INFO: Spec finished: create and navigate to digital twin app with status: FAILED

maximnaidenov commented 3 years ago

With every integration test, you must start analyzing from the FIRST error. And in your logs it is: 00:22:58 error uiVeri5ExecuteTests - ERROR: Error while taking report screenshot: WebDriverError: unknown error: cannot activate web view This speaks of testing a mobile app and problems with activating it. Can you please describe the setup IN DETAILS.

antarachoudhury commented 3 years ago

The scripts are not testing a mobile app.The scripts are running fine locally but when in Jenkins it is failing. Detail command used in Jenkins which we recently changed to below from testOption to runOption.

!/usr/bin/env groovy

@Library(['pipeline-lib']) _

node{

stage('System Tests') {

    deleteDir();
    git url:'https://github.wdf.sap.corp/SAPPIN/COPIN-UIVERI5.git', branch:'master', credentialsId: 'P1942461714_GIT_PA_TOKEN_PasswordType';
    setupPipelineEnvironment script: this;

    List runOptions=[];
    runOptions.add("--config.connectionConfigs.direct.binaries.chromedriver.version=83.0.4103.39");
    runOptions.add('--seleniumAddress=http://selenium:4444/wd/hub');
    runOptions.add('--params.TEST_USERNAME=Automation_user@yopmail.com');
    runOptions.add('--params.TEST_PASSWORD=Initial123');
    runOptions.add('--specs=./tests/crossAppTests.spec.js');
    runOptions.add('--baseUrl=https://bigbuild-dev-copin.internal.cfapps.sap.hana.ondemand.com/cp.portal/site#Shell-home');
    runOptions.add('./conf.js');

    uiVeri5ExecuteTests script: this, installCommand: 'npm run prepare-run', runOptions: runOptions;

    publishHTML target: [
        allowMissing: true,
        alwaysLinkToLastBuild: true,
        keepAll: true,
        reportDir: 'target/report/screenshots/',
        reportFiles: "report.html",
        reportName: "UIVeri5 Test Report"
    ];

}

}

With these commands some scripts are working fine but some are failing.

tsaleksandrova commented 3 years ago

sorry for late reply, but have you tried adding chrome options as mentioned in https://stackoverflow.com/questions/54297559/getting-cannot-activate-web-view