we are doing code coverage for the marketplace app, we are facing an issue, code coverage not increasing the percentage, but we are running the particular function or module.
This seems to be some issue with code coverage lately and faced the similar issues. I was able to overcome this by deleting the content of coverage folder and report.json file from my app and reran the tests.
I implemented your solution, and it worked fine for some functions, but not all functions, then deleted content in the coverage folder & deleted the report.json file, again and again, but it’s not working.
I believe you have followed the steps as mentioned in the handbook. If the steps are followed correctly and still facing issue mentioned then the same could be resolved using below options
Try upgrading to latest fdk version 8.3.0 or higher
After upgrade remove the artefacts from coverage folder and also the report.json file from application root folder in your workspace.
Allow insecure content when adding the dev=true query string parameter, as this causes the other files to not appear in the coverage report. Once you allow the insecure content, it would appear in the coverage report.
Kindly try these options. If facing the same still kindly do revert back.
Please take this is an urgent query for us, want to delivery this application to our end customer end of this month.
After getting a solution from your side only start processing further in the code coverage and move to the review process in fresh release for approval.
Is there any way we can reproduce the issue on our systems? Or Any screen recordings that you can share with us? I am guessing this can be problem with the code coverage module within the CLI.
When I try to do the code coverage the actual function is executed in the dev mode yet the coverage file is not updated. please refer to the below-attached video.
I sent you a private message on the forum to collect your app specific details and hopefully try to reproduce the issue. We can work with app reviews team to skip the automated rejected part if the CLI isn’t working as expected!