How to improve code coverage for catch blocks in Interface API(ticket open, contact open), app lifecycle methods, Data API(loggedInUser) and in iparams retrieve API?

I am checking on Code coverage in my CTI app. I have app.initialized() in document.ready with catch block to log the error, Interface APIs to open the ticket and contact, Data API to get logged In agent details and also I am getting iparams value from client.iparams.get() API. I have a catch block for all these APIs in order to validate the App. I didn’t do the code coverage for these catch blocks. So, I can’t reach 80% of Coverage in Branches.

Is there any way to increase the percentage? or Can I pack the App to push to the Marketplace?

2 Likes

Hello @Dineshkumar_Ravichan,

Sorry, it took quite a long time getting back to you with appropriate answer.

Yes, it is not quite possible to cover the code within the catch blocks. Please see if you can reach the code coverage of 80% skipping the catch blocks. Even though, if you can’t skip, we can work with you to help you get through the App review process after verifying the same.

1 Like