Issue with code coverage and abrupt fresh_client js error



Hello team ,

We have developed our application and we are stuck at code coverage part.

In order to achieve the desired percentage of code coverage in a single session of fdk run it is getting impossible for us.

Many of the time script from you library starts behaving abnormally and app gets crashed as well the session in command prompt which is making code coverage target difficult. Also ,I have attached 3 screenshots of the issue we are facing.

It would be of much assistance if we could get any sort of technical assistance as we are ready with our app for marketplace listing.

Thanks & Regards

@honey The code coverage is stored locally in the app file. So the remaining tests can be done in multiple sessions. There’s no need to test the complete app in one session of running the app.

If any particular file or statement coverage is not retained across sessions, please provide the screenshot of the coverage file from your app to analyze it further.

About fresh_client.js error, could you provide more information on when does it occur and the detailed steps to reproduce the issue?
Also, could you attach the export of the browser logs to troubleshoot it?

1 Like

Hello ,

Issue occurs when application is hitting an external API request and in that course it starts to behave the same way it has been captured in screenshots.

So in all i can see if there are multiple attempts for API requests it creates problem.

Thanks & Regards

The request method has a rate limit of 50 requests per minute. I don’t recall if it applies to local testing, but if it does, it could be it.

@honey Could you share the code snippet of the HTTP request made to the external API?

Please hard-code the variables used in the app and hide any sensitive information.

1 Like

Hello Raviraj ,

The issue of js seems to be resolved by reducing the number of request made per minute.

But the first issue/problem still persist as i am not able to achieve the min of 80% coverage as either due to session abruptly ends or if in between any changes are done in js it gets back to 0% coverage.

Please suggest some method to get it done for submission as it requires at least 80% coverage.

Thanks & Regards

Also , is there any way to know the reasons why our app get’s rejected so that we can work upon the same.

@honey The app submission will get rejected if the code coverage report is less than 80% in any of the four listed components.

Regarding the following, yes, it’s expected behavior. If any changes made to a particular script file, the test coverage for the whole file will be reset as the platform wouldn’t know which of the parts are affected due to the change made.

Regarding the abrupt fdk run session ends, would you be able to capture it on a screen recording to understand why it happens to help you troubleshoot the issue?
If it would have any private information, please let me know so that I can start a private conversation thread to share it with me to continue troubleshooting.