cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Unit Test Code Coverage

kachin_agarwal
Product and Topic Expert
Product and Topic Expert
0 Likes
681

Hi All,

Currently we are developing an Industry Cloud Solution using CAP framework and UI is developed using Fiori Elements. Since all the feature is developed using standard layout - we are not writing any extensions. The entire UI is generated using CDS annotations. We are not writing any q-units since there are no methods. All of our coding is done in annotation.cds. So i am not sure how can we write unit test cases and how do we measure the code coverage for annotation.cds files?

Thanks,

Kachin

Accepted Solutions (0)

Answers (2)

Answers (2)

lgonzalezc
Advisor
Advisor
0 Likes

In terms of Unit Testing, in case of Fiori Elements app that should be out of scope (asuming plan FE app with no extensions), as this is taken care by the standard templates. Nonetheless you could create OPA tests to test the user interactions with the UI such as buttons, filters, search helps, dialogs, etc..

Still researching how to include code coverage for that scenarios, though.

Any further input on this topic is more than welcomed!

Regards

Luciano

david_kunz2
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Kachin,

I'm not sure what you want to test in `annotation.cds`, but if you want to programmatically scan your model, you can access `cds.model` in your running app, containing all defined entities including its annotations.

I'm not sure if I understand the use case of 'code coverage' for annotations. You want to see which of them are actually used?

Best regards,
David