This article shows how to generate data for your first Salesforce Object in GenRocket. The following steps will be covered in this article:
- Create a GenRocket Project
- Browse Salesforce Objects
- Import the Salesforce Object into a GenRocket Domain
- Set the Domain's loopCount
- Modify an Attribute's Generator
- Add and Configure the SFObjectInsertReceiver
- Create a GenRocket Scenario
- Generate and Insert Account Data into Salesforce
Note: If you have not already added a Salesforce Profile to GenRocket, please do so before continuing. More information can be found here: How Do I Create a Salesforce Profile in GenRocket?.
Step 1 - Create a New GenRocket Project
Step 3 - Import the Account Object into a GenRocket Domain
You will need to select the Salesforce Object and the Fields to be imported into the GenRocket Domain. Complete the following steps to do so:
Step 4 - Set the Domain's loopCount
A Domain's loopCount determines how many records of test data are generated. This information can be changed from the Domain Dashboard (shown in Step 3 above).
- Click on the Edit (Pencil) icon to change this value.
- Click on the Value field and enter a number value. For this example, 20 will be entered.
- Click the Save button to finish.
Step 5 - Modify an Attribute's Generator
When a Salesforce Object is imported into a GenRocket Domain, a Generator will be assigned to each Attribute (i.e. Field) automatically. Sometimes the Generator or its configuration will need to be modified to ensure the right test data is generated.
- Click on an Attribute within the Domain Dashboard to view its Generator configuration.
- For this example, the nameC Attribute will be selected and it's Generator will be changed.
- The Generator configuration will be displayed at the bottom of the screen.
- Currently, the RangeCatReferenceGen is assigned to the Attribute. We want to replace it with the FullNameGen Generator.
- Click on the Quick Generator Replacement Menu and type FullNameGen.
- Click to select the FullNameGen Generator and then click the Replace button.
- Make any needed changes to the Generator configuration.
- Click on any field to type a new value or use the drop-down menus to make a selection.
- Click the Save Generator button to save your changes once finished.
- Use the Preview Tab to see a preview of the data for the Attribute.
Step 6 - Review the SFObjectInsertReceiver Configuration
The SFObjectInsertReceiver will be automatically added and configured for the GenRocket Domain. This Receiver will receive the generated data and insert it into Salesforce over RESTful Web services.
- It can be viewed from the Domain Dashboard by clicking on SFObjectInsertReceiver within the Domain Receivers pane.
- The parameter configuration for the SFObjectInsertReceiver will appear as shown below for this example:
Step 7 - Create a GenRocket Scenario
Next, you will need to create a Scenario for the GenRocket Domain. Complete the following steps:
- In the Domain Dashboard, click the Quick Scenario button in the Domain Scenarios pane.
- The Name will be automatically populated and match the Domain Name.
- You may change the name if desired or add a Description.
- Click the Save button to finish.
- You will be redirected to the Scenario Dashboard, as shown below.
- Here, you can make any needed configuration changes before generating and inserting data back into Salesforce.
Step 8 - Generate and Insert Account Data into SalesforceFinally, the data will need to be inserted into Salesforce in real time from the Scenario Dashboard.
- Click the Execute From Web button.
- A confirmation message will be provided once the Salesforce data has been generated.
- Click the OK button to close this message.
This video may be used to see these steps in action as well. Please note that the screen may appear slightly different due to GenRocket version differences between the instructions above and this video.