How to Install Smock-it?

Smock-it is a command-line tool that generates realistic synthetic test data for Salesforce environments. Ideal for QA professionals, developers, and Salesforce admins, it helps validate functionality and workflows while safeguarding customer data privacy.

Prerequisites:

Before installing Smock-it, you will require the following to ensure Smock-it installs and executes successfully.

  • Salesforce CLI

  • Node.js (v18.0.0 or later)

  • Mockaroo API Key (Free version will work)

 

✅Here’s how to install it:

Once done with the installation and signup, follow the following steps:

  1. Open your terminal and run:  sf plugins install smock-it

2. Verify Installation using: sf plugins. (make sure v2.0.0 is displayed)

3. Set the following environment variables: MOCKAROO_API_KEY="your_mockaroo_api_key"

To find the API Key, visit https://mockroo.com/myaccount after signing up.

 

🚀To Begin the data generation process:

  1. Provide initial details by running: sf template init

2. After configuring the base setup, generate data using: sf data generate -t “templateName.json” -a aliasName

3. The generated data will be stored in the data_gen > Output folder according to the specified output format.

✨For those who already have Smock-it installed, you can update to v2.0.0 by running:  sf plugins update 

Next
Next

Packaging: A Comprehensive Guide for Salesforce ISVs on AppExchange