FDK pack breaking after update to version 9.1.2

Hi,
I updated my FDK version to 9.1.2 today. FDK pack was working before the update. Now suddenly it shows that the code is not reaching the 80% coverage.
The code coverage is 95.43% as checked from jest.
Attaching my file structure

CC: @Sushant

Hi @Keshav_mittal

Use the following CLI command to skip code coverage: fdk pack --skip-coverage. For more details, refer to this post.

Hi @Kithiyon
Thank you. This would help us for the testing phase.
Would this work for submission on marketplace as well? Because we have completed the unit testing and would be submitting the app.

Hello @Keshav_mittal

Can you share a screen shot of your code coverage?

Sure,

Hi @Keshav_mittal

Can you share your local testing coverage summary from your CLI

@Kithiyon

Hi @Keshav_mittal Did you tested your application on local server?

We are using a monorepo. Inside the monorepo, there is a package for the freshdesk application. I’ve shared the directory structure for the freshdesk repo which contains all the tests.
The results are after running the command “yarn jest --coverage” on the local system.

Hi @Keshav_mittal

Thanks for the details…!

@Raviraj can you help here?

Hi @Keshav_mittal,

We do not require writing unit tests or other automated tests for the apps. If you write them, that’s great. But our platform does not require them.

We require the app’s functionalities to be tested completely once before submitting them to the Marketplace. You can choose a manual or automated test.
We ensure this by measuring the code coverage by FDK instrumenting the code covered while testing the app locally. The code coverage results are shared along with the app zip files when the app is submitted to the Marketplace.

Learn more about the code coverage requirement and how to achieve it here - Freshworks Developer Docs | Introduction to code coverage

If your app is built with a frontend framework, it will not generate the code coverage from FDK, as the tested files would be modified while the app source code is compiled and minified.
In this case, submit the app as per our code review guidelines, and this code coverage requirement will be skipped automatically.

1 Like

@Raviraj Thank you for the clarification

2 Likes

@Kithiyon @Raviraj
There are still some issues with the packing on jenkins pipeline. We wish to use the older version of fdk for the time being. Is there a way to chose which fdk version to install?
We tried it using the link on this post Chose FDK version but this is not working. Can you help?

Hi @Keshav_mittal

To pack your app from the CLI, use the following command:

fdk pack --skip-coverage

If you haven’t done this yet, please do so.

To check the code coverage summary, follow these steps:

Run your app on a local server with:

    fdk run

Terminate the server by pressing

ctrl+c.

You can now view the code coverage summary on your terminal.

Hi @Kithiyon
These are running on my local system but are failing on the Jenkins Server.
Therefore we want to revert to FDK version 9.0.9. Can you help regarding this?

Hi @Keshav_mittal

I’m not familiar with Jenkins Server. Freshworks expects their partners to achieve 80% code coverage when submitting an app for review. You need to achieve 80% code coverage to submit the app for review.

@Raviraj Can you help on how to change the FDK version?

Hi @Keshav_mittal,

You can use the following CDN URL to install the desired FDK version.

npm install https://cdn.freshdev.io/fdk/v9.0.9.tgz -g

Note: If you want to try other version, this CDN URL will only work for v9.0.0 and upwards.

1 Like

Thank you @Raviraj for the help.

1 Like

This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.