Story

An Admin wants to create a G-Repository and then test it by creating a G-Repository Client Repo for a new Project. Once created, they will run the G-Repository Scenario through GenRocket Multi-User Server (GMUS) or G-Repository.


Actors

  • G-RepositoryServer
  • G-RepositoryClient
  • GenRocket Multi-User Server (GMUS)


Story Steps

  1. Admin Installs G-Repository Server
  2. Admin Launches G-Repository Server
  3. G-Repository Server Downloads Repos from GenRocket Cloud
  4. Admin Sets up GenRocket Multi-User Server (GMUS)
  5. Admin Creates a Project in GenRocket Web Platform
  6. Admin Uses Scratch Pad to Create a User Domain with Attributes
  7. Admin Sets loopCount to 10,000
  8. Admin Adds the XMLFileReceiver to the User Domain
  9. Admin Creates a Scenario
  10. Admin Creates a G-Repository Client Repo for the Project
  11. Admin Runs the Scenario


Step 1: Admin Installs G-Repository Server

Install G-Repository Server on a Linux or Mac computer to automatically download and manage all required files for test data generation. 

Note: While G-Repository can be installed on Windows OS, it is not recommended nor directly supported.


  1. Create a base subdirectory on the local machine 
    • Linux example - /home/username/GRepositoryServer
    • Mac example - /Users/username/GRepositoryServer

  2. Change the directory to the new base subdirectory
  3. Run the genrocket -grsrvc command to create your GRepositoryServer (Click here for more information)



Step 2: Admin Launches G-Repository Server

Run the genrocket -grsrvr command to launch the server (Click here to see an example). 




Step 3: G-Repository Server Downloads Repos from GenRocket Cloud

This step happens automatically after launching the G-Repository Server. 

  1. G-Repository connects to GenRocket Cloud
  2. The latest Repos are downloaded to the G-Repository Server



Step 4: Admin Sets up GenRocket Multi-User Server (GMUS)

GenRocket Multi-User Server (GMUS) will need to be set up prior to running the G-Repository Scenario. This involves two steps: 

  1. Admin registers the Client Application in GenRocket
  2. Admin registers users through the Client Application


Step 5: Admin Creates a Project in GenRocket Web Platform

Create a Project titled "TestUserProject." This Project will have a default Project Version, which will be used to finish the setup steps for generating your test data. Click here to learn more.

  1. Log into the GenRocket web platform.
  2. Click on the New Project button.
  3. Enter a Name (at minimum) and click Save.



Step 6: Admin uses Scratch Pad to Create a User Domain with Attributes

Create a single User Domain using Scratch Pad with the following Attributes. Click here to learn more.

  1. In the GenRocket web platform, expand the New Domain menu.
  2. Select Scratch Pad.
  3. Enter a Name and select a Delimiter.
  4. Enter/Paste the Attribute names and click on Create with Generators.




Step 7: Admin Sets loopCount to 10,000

Set the User Domain loopCount to 10,000. GenRocket will generate 10,000 user records. Click here to learn more

  1. Click on the Edit (Pencil) icon for global.User.loopCount Domain Variable.
  2. Enter 10,000 and click Save



Step 8: Admin adds the XMLFileReceiver to the User Domain

Add the XMLFileReceiver to the User Domain to morph the generated test data into the XML output format. Click here to learn more.

  1. Within the Domain Dashboard, click on the New Receiver button.
  2. Use the filter field or categories to locate the XMLFileReceiver.
  3. Click the Plus (+) to add the Receiver. 



Step 9: Admin Creates a Scenario

Create a Scenario for the User Domain. Click here to learn more.

  1. Within the Domain Dashboard, click on the Quick Scenario button.
  2. Click Save.



Step 10: Admin Creates a G-Repository Client Repo for the Project

Create a G-Repository Client Repo for the new "TestUserProject." See How to set up a G-Repository Client Repos to learn more.

  1. Create a base directory on the local machine.
  2. Change to that directory in the command prompt.
  3. Create a G-Repository Client Base Subdirectory.
  4. Create the G-Repository Client Repo for the Project (e.g., TestUserProject).


Base Directory Example (Perform only once)


G-Repository Client Repo Example (Connecting to GRepository Server)


Step 11: Admin Runs the Scenario

A User Scenario can be run in one of two ways: 

  • By making a REST Call through GMUS
  • By running the G-Repository -grs Command on the Command Line


Step 11a: Admin Sends a REST Statement to the GMUS

  1. Launch GMUS using the genrocket -gmusr command with a minimum of a port number (see GMUS API: Startup and Launch Commands for more information).



  2. Create a REST Statement (see GMUS API: Run a Scenario with GRepository Client for more information)

    Rest Request

    http://<ipAddress>:8070/rest/repoScenario

    JSON Payloads to execute Scenario:

    Please note that the clientAppId and clientUserId are obtained in Step 4 of this article.
    {
    "clientAppId" : "XXXXXXXX-1e47-abcd-ba66-XXXXXXXXXXXX",
    "clientUserId": "XXXXXXXX-abcd-4284-aa45-XXXXXXXXXXXX",
    "username" : "jane.doe@gmail.com",
    "scenario" : "UserScenario",
    "repoName": "TestUserProjectRepo"
    }

  3. Run the Scenario by making the REST call.

    Example: Postman

    The scenario being run through GMUS on Command Line after Call Made


Step 11b: Admin uses -grs Command 

Alternatively, use the -grs command to generate data only using the G-Repository Scenario. Click here to learn more.
 

genrocket -grepo repoName -grs Scenario 


Example


Sample Output

The first 15 rows are shown in the snippet below: 

<rows>
  <row id="1" firstName="Zack" lastName="Ritz" middleInit="G" username="User1" password="C4CA4238A0B923820DCC509A6F75849B" cardNumber="5110000000000014" ssn="001-01-0001"/>
  <row id="2" firstName="Stickney" lastName="Gerhart" middleInit="T" username="User2" password="C81E728D9D4C2F636F067F89CC14862C" cardNumber="4100000000000019" ssn="001-01-0002"/>
  <row id="3" firstName="Tapp" lastName="Hershberger" middleInit="E" username="User3" password="ECCBC87E4B5CE2FE28308FD9F2A7BAF3" cardNumber="6011010000000003" ssn="001-01-0003"/>
  <row id="4" firstName="Hurt" lastName="Ludwig" middleInit="I" username="User4" password="A87FF679A2F3E71D9181A67B7542122C" cardNumber="5210000000000021" ssn="001-01-0004"/>
  <row id="5" firstName="Garvey" lastName="Mckeon" middleInit="Y" username="User5" password="E4DA3B7FBBCE2345D7772B0674A318D5" cardNumber="4100000000000027" ssn="001-01-0005"/>
  <row id="6" firstName="Brace" lastName="Easley" middleInit="C" username="User6" password="1679091C5A880FAF6FB5E6087EB1B2DC" cardNumber="6011210000000017" ssn="001-01-0006"/>
  <row id="7" firstName="Bopp" lastName="Dixson" middleInit="W" username="User7" password="8F14E45FCEEA167A5A36DEDD4BEA2543" cardNumber="5310000000000038" ssn="001-01-0007"/>
  <row id="8" firstName="Gill" lastName="Chaffee" middleInit="I" username="User8" password="C9F0F895FB98AB9159F51FD0297E236D" cardNumber="4100000000000035" ssn="001-01-0008"/>
  <row id="9" firstName="Meece" lastName="Hamill" middleInit="P" username="User9" password="45C48CCE2E2D7FBDEA1AFC51C7C6AD26" cardNumber="6011310000000023" ssn="001-01-0009"/>
  <row id="10" firstName="Vancleave" lastName="Doolittle" middleInit="Y" username="User10" password="D3D9446802A44259755D38E6D163E820" cardNumber="5410000000000045" ssn="001-01-0010"/>
  <row id="11" firstName="Rosas" lastName="Tidwell" middleInit="X" username="User11" password="6512BD43D9CAA6E02C990B0A82652DCA" cardNumber="4100000000000043" ssn="001-01-0011"/>
  <row id="12" firstName="Fournier" lastName="Duhon" middleInit="P" username="User12" password="C20AD4D76FE97759AA27A0C99BFF6710" cardNumber="6011410000000039" ssn="001-01-0012"/>
  <row id="13" firstName="Copper" lastName="Matheson" middleInit="K" username="User13" password="C51CE410C124A10E0DB5E4B97FC2AF39" cardNumber="5510000000000051" ssn="001-01-0013"/>
  <row id="14" firstName="Spitzer" lastName="Schott" middleInit="K" username="User14" password="AAB3238922BCC25A6F606EB525FFDC56" cardNumber="4100000000000050" ssn="001-01-0014"/>
  <row id="15" firstName="Hathcock" lastName="Galloway" middleInit="H" username="User15" password="9BF31C7FF062936A96D3C8BD1F8F2FF3" cardNumber="6011910000000046" ssn="001-01-0015"/>