Testing Extensions on a Local Server in SuiteCommerce

Testing SuiteCommerce extensions locally before deployment ensures quality. Follow these steps to verify your extensions effectively.

·2 min read·View Oracle Docs

TL;DR Opening

Testing SuiteCommerce extensions locally before deploying them to a live environment is essential to ensure everything functions correctly. This article outlines how to efficiently test extensions on a local server using Node.js and Gulp.

How to Test Your Extension Locally

To effectively test your SuiteCommerce extensions, follow these steps:

  1. Start Your Local Server: Before testing, ensure that your local server is active. Navigate to your Commerce website on the local server.

    • This can typically be achieved with the command:
      bash
      gulp extension:local

    This command compiles your source files and sets up a LocalDistribution directory.

  2. Change Display Types: Visit a product list page and alter the display type. Notice that the grid and table views will not change, as illustrated below:

    Table View of Product List

  3. View the Detailed List: Switching to the list display type should show detailed descriptions for each product:

    List View with Item Descriptions

Important Considerations

  • Typically, extensions should be tested locally before going live. If your extension includes SuiteScript or JSON configuration files, you must deploy those to your NetSuite account.
  • SuiteScript services will not be accessible until deployment, and JSON changes won’t apply until they are deployed as well.
  • If manifest files are updated, remember to restart the local server to see those changes reflected.

Conclusion

Testing your SuiteCommerce extensions on a local server is a crucial step in the development process. This allows you to verify functionality and performance before the final deployment to your live site. Following the steps outlined here will help ensure your extensions operate as intended before going live.

Frequently Asked Questions (4)

What command is used to start the local server for testing SuiteCommerce extensions?
To start the local server, use the command `gulp extension:local`, which compiles your source files and sets up a LocalDistribution directory.
Do I need to deploy SuiteScript services before testing locally?
Yes, SuiteScript services will not be accessible during local testing and must be deployed to your NetSuite account before testing these aspects.
Are JSON configuration file changes effective immediately during local testing?
No, JSON configuration changes won’t apply until they are deployed to your NetSuite account, so they can't be tested locally without deployment.
What should I do if my extension's manifest files are updated?
If the manifest files are updated, you need to restart the local server to see the changes reflected during local testing.
Source: Test the Extension Oracle NetSuite Help Center. This article was generated from official Oracle documentation and enriched with additional context and best practices.

Was this article helpful?

More in Commerce

View all Commerce articles →