cancel
Showing results for 
Search instead for 
Did you mean: 

CAP: How to perform System test for CAP based projects? Only testing using Mocha/Chai will suffice?

09-09-2022 6:13 PM
KM11 Product and Topic Expert
1054 views 2 comments
0 Likes
SAP Managed Tags
Subscribe

Hi Experts

david.kunz2 thomas.jung maxim.naidenov sarah_n

For testing CAP projects(node.js), which testing frameworks shall be used for System Testing?

With UIVeri5 getting deprecated, are there any examples of testing the node.js code in CAP via WDIO or WDI5?

Is unit testing with Mocha and Chai sufficient or we shall carry out the system tests using any suggested framework?

Thanks

Kanika

0 Likes

Accepted Solutions (0)

Answers (1)

Answers (1)

vobu
Active Contributor

hm, nothing out of the ordinary here with regards to cds.test() and wdi5:

- use cds.test() (or manual bootstrap of your CAP app) to do unit-, api- and service-testing

- use wdi5 for integration- and e2e-tests

for the latter, if you have you CAP app running (aka a webserver serving the UI), you can point the wdio hostname, port and path (https://webdriver.io/docs/configurationfile/) e.g. to "localhost", 4004 and "/app" and the wdi5 configuration (https://ui5-community.github.io/wdi5/#/configuration) to the index file of your UI (e.g. "index.html").

Happy testing!