cancel
Showing results for 
Search instead for 
Did you mean: 

Integration Tests - Error on BAS - Cannot start Chrome - libnss3.so

2,301

Hi Colleagues,

I have a SAPUI5 project and the opa5 tests are running in VSCode, in my local environment, but when in Bussines Application Studio - BAS the following error is displayed:

How can I solve this issue?

Cannot start Chrome

/home/user/projects/rb-dare-sales-app/.cache/puppeteer/chrome/linux-1069273/chrome-linux/chrome: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory

###################################

karma.config

process.env.CHROME_BIN = require("puppeteer").executablePath();<br>module.exports = function (config) {<br>    config.set({<br>        frameworks: ["ui5"],<br>        browsers: ["Chrome"],<br>        logLevel: config.LOG_ERROR,<br>        browserConsoleLogOptions: {<br>            level: "error",<br>        },<br>        ui5: {<br>            type: "library",<br>            paths: {<br>                src: "packages",<br>                test: "test"<br>            },<br>            configPath: "ui5-karma.yaml",<br>            mode: "html",<br>            testpage: "test/testsuite.qunit.html"<br>        },<br>        proxies: {<br>            "/resources": {<br>                target: "https://ui5.sap.com/1.71.30/resources",<br>                changeOrigin: true<br>            }<br>        },<br>        proxyValidateSSL: false,<br>        client: {<br>            args: ["--BTQ", config.BTQ]<br>        }<br>    });<br>};

###################################

###################################

ui5-karma.yaml

specVersion: '2.3'<br>metadata:<br>  name: sap-ric-dare<br>type: application<br>resources:<br>  configuration:<br>    paths:<br>      webapp: ./<br>server:<br>  customMiddleware:<br>    - name: ric-middleware-less<br>      beforeMiddleware: serveResources
 ---# Custom middleware extension definitionspecVersion: "2.3"kind: extensiontype: server-middlewaremetadata: name: ric-middleware-lessmiddleware: path: tools/serverMiddleware/ric-middleware-less.js 
  

###################################

###################################

package.json

...<br>"devDependencies": {<br>        "@sap/ux-ui5-tooling": "^1.8.3",<br>        "@ui5/logger": "^2.0.1",<br>        "axios": "^0.22.0",<br>        "cross-env": "^7.0.3",<br>        "eslint": "^7.32.0",<br>        "http-proxy-middleware": "^2.0.1",<br>        "husky": "^7.0.2",<br>        "karma": "^6.4.1",<br>        "karma-chrome-launcher": "^3.1.1",<br>        "karma-coverage": "^2.0.3",<br>        "karma-ui5": "^2.4.0",<br>        "lerna": "^4.0.0",<br>        "less-middleware": "^3.1.0",<br>        "puppeteer": "^19.3.0",<br>        "run-script-os": "^1.1.6",<br>        "shx": "^0.3.3",<br>        "simple-git": "^2.46.0",<br>        "ui5-middleware-livecompileless": "^0.2.1",<br>        "ui5-middleware-livereload": "^0.5.5",<br>        "ui5-middleware-simpleproxy": "^0.7.3"<br>    },<br>...
###################################
Yarn version: 1.22.19<br>Node version: v14.17.1<br>NPM version: npm -v 6.14.13
###################################
Many Thanks for your attention!

Accepted Solutions (0)

Answers (2)

Answers (2)

ido_perez
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

It is still not possible to run Chromium based browsers on BAS. But you can use this extension originaly intended for WDI5 tests to run Firefox.

Thanks,

Ido

inesmenezes
Associate
Associate
0 Kudos

Hi Ido,

I can't find that extension (Headless Testing Framework) on BAS. Does it still exist and how can I install it?

Thanks,

Inês

inesmenezes
Associate
Associate
0 Kudos
Hi Ido, I found the way to install the Headless Testing Framework but cannot configure the opa5 (karma.config) to run on firefox. Any suggestion on this matter?
ido_perez
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

We are aware of this issue. Currently BAS doesn't support running Chrome which is a requirement for several UI testing frameworks. Hopefully we will be able to update on this topic soon.

Best regards,

Ido

DimoUzunov
Participant
0 Kudos

Hello Ido,

Is there any update on this issue? Since BAS cannot run any integration tests and this is an issue persisting for a long time. If we want to use BAS as our daily development environment makes some sense to be able to use it for all tasks.

Best Regards,

Dimo