cancel
Showing results for 
Search instead for 
Did you mean: 

How to Write a Unit Test Suite in SAP Web IDE?

iamjaredm021
Participant
0 Kudos

Hi Experts,

We have a requirement to write a unit test suite in sample-service.test.js (see attached sample-servicetest.txt) by calling functions from sample-service.js (see attached sample-service.txt) in SAP Web IDE. How should the functions from sample-service.js be called in sample-service.test.js so it will be covered by the test using JEST?

Best regards,

Jared


Accepted Solutions (1)

Accepted Solutions (1)

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert

Hi ,

WebIDE uses OPA5 for Unit Tests:

https://blogs.sap.com/2018/10/03/testing-your-sapui5-application-with-opa5/

https://blogs.sap.com/2018/05/21/automated-testing-for-sap-fiori-apps-piece-of-cake-with-sap-web-ide...

AFAIK, there is no support for JEST in WebIDE.

Furthermore, I would suggest checking out the Business Application Studio which will allow you to use other tools such as JEST as well as @sap/grunt-sapui5-bestpractice-test

Best regards,
Ivan

Answers (0)