Code Coverage is not moving up as code is executed

Hi Team,

We are facing issues with the code coverage for the public app that we are working on. We have worked on the same code earlier and we are able to complete the coverage, but now we are running the code and it shows the lines are executed but the coverage is not moving forward. We are facing this issue for another public app as well. Please let us know how we can solve this ?

Hello @hemakumar

Did you happen to discover this handy article on our community wiki around code coverage by @Raviraj ? Can you check to see if this helps you?

1 Like

Hi @satwik,

Yes, we have followed the steps which is mentioned in the document. And we also see the code coverage is increasing. But for few line alone though we run the app the code coverage doesn’t show as it’s been executed.

Hi @hemakumar,

Could you show the code where the coverage is not tracked and the steps you have followed to test those functionalities?

If the uncovered code is sensitive, you can let me know and I can create a private thread here to share the code with me.

Hi @Raviraj

The app needs to be set up in local machine since we need to setup oauth and run the code, Can we connect over a quick call to demonstrate this, Please let me know further.

@hemakumar We don’t want to replicate the issue at the moment.
We want to see if the code is a platform framework code or custom code and how are you trying to cover them in your local testing.

If it’s an issue at FDK, it would help us to see which code is not being tracked and troubleshoot further on why. In that case, we could jump on a call over our office hours and try to unblock your progress.

1 Like

All,
@Saif @Raviraj

Facing the similar issue with apps having async methods. Not very sure but found this post which looks similar javascript - How to test async calls so istanbul will cover it? - Stack Overflow

@hemakumar please let me know if you were able to resolve your issue.

All,

The issue of coverage is resolved post upgrading to latest fdk version 8.3.0.
After upgrade remove the artefacts from coverage folder and also the report.json file from application root folder in your workspace.

Cheers!!!

HI @Sachin_Kumar Thanks for your reply, I have tried the same steps as suggested and still facing the issue.

@hemakumar As mentioned I was facing the same issue with my apps however the issue got resolved after the upgrade and cleaning my app’s coverage folder and report.json file. If possible, we can connect over a call and try to troubleshoot the issue.