Test your first app

Info:

Ensure you have previous steps and have FDK CLI version 9.0.0 or higher with Node version v18.13.0 installed locally

To enable local testing of apps, most features and interfaces offered by the Freshworks app development platform are simulated in the FDK. In addition, you can test the app lifecycle events such as app installation, configuration, and uninstallation either through a custom UI or through end-to-end testing.

The URL to access the custom UI is displayed when you run the fdk run command, to test apps. Testing lifecycle events through the custom UI, results in designing the app experience around a UI which is different from the UI in which the app is finally published. This can lead to a mismatch in app user experience.

Test the app

Important:To test your app, use the latest version of Chrome.

  1. From the command line, navigate to the directory that contains the app related files and run the fdk run command. The FDK starts the local test server. The test URLs to access the product UI, the App Settings page (or Custom installation page), and the URL to the serverless events simulation page are displayed.

  2. Navigate to the system settings page at http://localhost:10001/system_settings. All modules configured in the App manifest are listed.

  3. In the system settings page,

    1. Select the modules for which you want to test the app logic. The Enter account URL section is displayed, with a prompt to enter the account URLs for all selected modules.

    2. The Organization Domain field is displayed, with a prompt to enter the organization domain value for the account.

      In the Organization Domain field, enter the domain value from the organization URL for the account. For example, if your organization URL is https://sample., the value in Organization Domain should be sample..

    3. The Enter account URL section is displayed, with a prompt to enter the account URLs for all selected modules.

      In the Enter account URL section, enter valid account URL(s) for the product(s) to which the selected modules belong. During app testing, this URL plays the role of the currentHost.

      Based on the currentHost, the currentHost.subscribed_modules, currentHost.org_domain and currentHost.endpoint_urls are determined. In the response payload of the currentHost data method and in the serverless events’ payloads, the determined values are used.

    4. If your app manifest includes the service_ticket or service_user modules and you select either of them, the Select Freshservice Product Type section will appear.

      In this section, choose the appropriate product type: ITSM or MSP.

      NoteIf your app manifest does not include the service_ticket or service_user modules, or if you have not selected either of them, the Select Freshservice Product Type section will not be displayed.

    5. Click Continue.

  4. If you have configured installation parameters for the app, the App Settings page is displayed at http://localhost:10001/custom_configs. Enter appropriate values for the installation parameters and click Install. Note:If you have not configured any installation parameters, a page is displayed with information on the configured system settings. A message stating that the app does not have an installation page is displayed.

  5. Log in to the Freshworks product account where you want to test the app deployment.

  6. To the default account URL displayed in the address bar, append ?dev=true.

    Example URL:

  7. Navigate to the appropriate location where the app is intended to be deployed, verify that the app is rendered, and test the app’s function.

Notes:
  • The extent of app testing is captured through the code coverage summary. For apps to be successfully published in the Freshworks Marketplace, each component in the coverage summary should be at least 80%. For more information, see Code coverage.
  • When testing your app, if you run into any issue, for a quick resolution from the support team, attach detailed logs of the output in your support ticket.