Closed navisarv closed 6 months ago
AFAIK, wdio
(and thus wdi5
) supports this out of the box: https://webdriver.io/docs/runner/#coverage
Disclaimer: haven't used it personally
I am looking as well for a way to get a coverage report of the UI5 e2e tests. I have tried to enable the coverage as described in the docs, but I get the following error:
This is based on the default e2e tests after generating a UI5 typescript app with generator-ui5-ts-app. I have added the following settings to the wdio.conf.ts: runner: [ "browser", { coverage: { enabled: true, extension: "ts", reporter: ["text", "html"], }, }, ],
Is this a problem with the configuration or with the wdio and ui5?
Thanks in advance!
hi pavlina, you're using the wdio "browser" runner, which executes the framework within the browser and which is not available for wdi5/UI5. you need the "local" runner: https://webdriver.io/docs/runner#setup
Hi Vobu,
I had the same issue as Pavlina, I also tried using the local runner but code coverage is not supported for the local runners. the tests run fine but there nothing happens and no coverage report is being shown or files being created.
As for the browser runner, it always starts localhost with a random port. I tried overwriting this in different methods but nothing worked. as you have clearly said before WDI5 does not support it.
From my understanding the WDIO framework uses Istanbul for code coverage, is there any workarounds for this?
Hi,
coverage reports do not work for e2e tests and it also does not make any sense. If you want to have coverage you need to use Component Testing which is simply not possible with wdi5.
Code Coverage in UI5 applications is currently possible on the unit and integration test layer.
Regards Simon
hey 👋 - silence for 30 days 🤐 ... anybody? 😀
closed 📴 because silencio 🤫 since an additional 14 days after staleness 📠
Hi Team, I would like to get coverage report for UI5 app and I am looking for similar to https://webdriver.io/docs/component-testing/coverage/
your help is much appreciated!!