Description

This article defines the syntax and explains how and when to use the jumpValue feature for G-Map. 


Story

Testers are testing in a shared environment, such that when they execute a test, the data generated affects the same database. More specifically, when Testers add data into the same account table, the accountId must not collide but be unique.


Actors

  • G-MapServer - Manages a cache of key/value pair data that GenRocket specific Generators and Receivers can access. A set of GenRocket Java Jars contain the code to launch a G-MapServer. A G-MapServer can run on any computer because it has a very small footprint (Linux is the recommended OS).
  • Computer - the machine where the Java Runtime, GenRocket Jars, and the G-MapServer will run
  • SA - System Administrator who can set up a G-MapServer
  • Tester - a User that manages Domains, Attributes, etc.
  • accountId - the key whose value needs to be mapped and managed by a G-MapServer
  • GMapGenJumpValueGen - see the article, How do I use the GMapGetJumpValueGen Generator?


Chapter 1 - SA setups a G-Map Server

  • SA selects a computer to set up a G-MapServer in their test environment
    • The computer doesn't need much power to host a G-MapServer
      • 1 to 4 CPUs
      • 8GB RAM
      • 250GB HD or SSD
      • Linux OS
  • SA downloads and installs Java Runtime onto the Computer
  • SA downloads and installs GenRocket runtime Jars on the Computer
  • SA sets up GenRocket environment variables 
  • SA launches a G-MapServer, on port 8500 of the computer with the following command
    • genrocket -gmap 8500
  •  The G-MapServer continuously monitors port 8500 for requests. 


Chapter 2 - SA initializes the G-MapServer with a Jump Value for the accountId

  • SA creates a property file containing the properties to connect and initialize the jumpValue
  • SA saves the file to some secure directory on the computer with the name, JumpValue.properties

Note: To understand Namespaces and Keys, see  What are G-MapServer Namespaces and Keys?


Example

url=http://localhost
port=8500
namespace=jumpValue
key=accountId
initialValue=10000


Chapter 3 - SA Initializes the JumpValue key to the G-MapServer

  • SA runs the following command on the Computer
    • genrocket -gmapijv /pathWhereFileIsLocated/JumpValue.properties


Example

$ genrocket -gmapijv /home/gmapServer/Downloads/JumpValue.properties

GenRocket Runtime belongs to https://app.genrocket.com

GenRocket Runtime Version: 3.5.29

GenRocket Version: 3.5.29.100

GenRocket Engine Version: 3.5.29.100

GenRocket Generator Runtime Version: 3.5.29.100

GenRocket Receiver Runtime Version: 3.5.29.100

GenRocket GRepositoryClient Runtime Version: 3.5.29.100

GenRocket GRepositoryServer Runtime Version: 3.5.29.100


Successful initialization of map namespace.key, jumpValue.accountId, with value, 10000

$ 


Chapter 4 - SA creates a config.xml so GMapGetJumpValueGens can connect to the G-MapServer 

  • SA runs the command, ifconfig, within a command-line terminal to attains the Computer's IP address
  • SA sees that the IP address of the Computer is, 192.168.5.94
  • SA opens a text editor and adds the following XML syntax defining the IP address, port, and endpoint
    • IP address - http://192.168.5.94
    • port - 8500
    • endpoint - rest
  • SA saves the file to the name, Config8500.xml


Example

Note: Make sure to get the URL syntax right: http://ipAddress:port/endPoint/

<config>   
  <requestURL>http://192.168.5.94:8500/rest/</requestURL>
</config>


Chapter 5 - Tester Modifies Account.accountId to use the GMapGetJumpValueGen Generator

  • Tester logs into GenRocket Web
  • Tester selects Project
  • Tester selects Project version
  • Tester selects the Account Domain
  • Tester has already set the loopCount to 10
  • Tester has already attached an XMLFileReceiver to the Domain
  • Tester has already created the Scenario
  • Tester selects the accountId Attribute
  • Tester modifies the accountId Attribute to use the GMapGetJumpValueGen and set the parameters
  • Tester saves their modifications


Example


Chapter 6 - Tester Downloads and runs the Scenario

  • Tester downloads the Scenario
  • Tester runs the Scenario


Example Output - based on the above-defined story

Note 1: In this example, the complete set of Attributes for the Account Domain are the following:

  • id
  • accountId
  • firstName
  • lastName
  • emailAddress
  • accountType
  • balance


Note 2: Since the jumpByLoopCount is set to True, each time the Scenario is run, the jumpValue will increase by 10.


First Run Results

In the first generation for ten rows of data, the accountId starts at 10,000, which is the initial value of the accountId. 

<rows>
  <row id="1" accountId="10000" firstName="Lupe" lastName="Barrett" emailAddress="blupe1@email.com" AccountType="MoneyMarket" balance="3874.35"/>
  <row id="2" accountId="10001" firstName="Luvenia" lastName="Deering" emailAddress="dluvenia2@email.com" AccountType="Checking" balance="9121.00"/>
  <row id="3" accountId="10002" firstName="Melba" lastName="Stanger" emailAddress="smelba3@email.com" AccountType="MoneyMarket" balance="7859.05"/>
  <row id="4" accountId="10003" firstName="Shawana" lastName="Senn" emailAddress="sshawana4@email.com" AccountType="Checking" balance="1375.20"/>
  <row id="5" accountId="10004" firstName="Delores" lastName="Stratton" emailAddress="sdelores5@email.com" AccountType="MoneyMarket" balance="7368.35"/>
  <row id="6" accountId="10005" firstName="Bobbie" lastName="Lemon" emailAddress="lbobbie6@email.com" AccountType="Checking" balance="5183.10"/>
  <row id="7" accountId="10006" firstName="Angel" lastName="Crossman" emailAddress="cangel7@email.com" AccountType="Checking" balance="7680.20"/>
  <row id="8" accountId="10007" firstName="Lea" lastName="Weinberg" emailAddress="wlea8@email.com" AccountType="MoneyMarket" balance="905.40"/>
  <row id="9" accountId="10008" firstName="Ena" lastName="Vaughan" emailAddress="vena9@email.com" AccountType="Checking" balance="8797.35"/>
  <row id="10" accountId="10009" firstName="Callie" lastName="Grimm" emailAddress="gcallie10@email.com" AccountType="Savings" balance="8185.95"/>
</rows>


Second Run Results

In the second generation for ten rows of data, the accountId starts a 10,010 because the value of the mapped accountId within the G-Map Server was incremented by the loopCount, whose value was 10.

<rows>
  <row id="1" accountId="10010" firstName="Candyce" lastName="Congdon" emailAddress="ccandyce1@email.com" AccountType="MoneyMarket" balance="6603.95"/>
  <row id="2" accountId="10011" firstName="Tanika" lastName="Brick" emailAddress="btanika2@email.com" AccountType="MoneyMarket" balance="3185.65"/>
  <row id="3" accountId="10012" firstName="Noella" lastName="Degroot" emailAddress="dnoella3@email.com" AccountType="Checking" balance="3741.30"/>
  <row id="4" accountId="10013" firstName="Georgia" lastName="Glidden" emailAddress="ggeorgia4@email.com" AccountType="Checking" balance="3933.00"/>
  <row id="5" accountId="10014" firstName="Page" lastName="Whittle" emailAddress="wpage5@email.com" AccountType="Checking" balance="333.70"/>
  <row id="6" accountId="10015" firstName="Rosia" lastName="Mccune" emailAddress="mrosia6@email.com" AccountType="Checking" balance="4564.00"/>
  <row id="7" accountId="10016" firstName="Amelia" lastName="Kaminsky" emailAddress="kamelia7@email.com" AccountType="Savings" balance="5459.60"/>
  <row id="8" accountId="10017" firstName="Jadwiga" lastName="Behnke" emailAddress="bjadwiga8@email.com" AccountType="Checking" balance="5263.60"/>
  <row id="9" accountId="10018" firstName="Mirtha" lastName="Boyce" emailAddress="bmirtha9@email.com" AccountType="MoneyMarket" balance="1908.55"/>
  <row id="10" accountId="10019" firstName="Shara" lastName="Hanks" emailAddress="hshara10@email.com" AccountType="Checking" balance="2840.60"/>
</rows>


Third Run Results

In the third generation for ten rows of data, the accountId starts a 10,020 because the value of the mapped accountId within the G-Map Server was again incremented by the loopCount, whose value was 10.

<rows>
  <row id="1" accountId="10020" firstName="Harriet" lastName="Sotelo" emailAddress="sharriet1@email.com" AccountType="Checking" balance="4656.00"/>
  <row id="2" accountId="10021" firstName="Mozelle" lastName="Howie" emailAddress="hmozelle2@email.com" AccountType="Checking" balance="2572.50"/>
  <row id="3" accountId="10022" firstName="Sherlyn" lastName="Harlan" emailAddress="hsherlyn3@email.com" AccountType="MoneyMarket" balance="8421.45"/>
  <row id="4" accountId="10023" firstName="Melany" lastName="Blumberg" emailAddress="bmelany4@email.com" AccountType="Savings" balance="8233.65"/>
  <row id="5" accountId="10024" firstName="Blanche" lastName="Maines" emailAddress="mblanche5@email.com" AccountType="MoneyMarket" balance="8375.45"/>
  <row id="6" accountId="10025" firstName="Sharron" lastName="Borg" emailAddress="bsharron6@email.com" AccountType="Savings" balance="8076.20"/>
  <row id="7" accountId="10026" firstName="Dina" lastName="Cross" emailAddress="cdina7@email.com" AccountType="MoneyMarket" balance="5577.05"/>
  <row id="8" accountId="10027" firstName="Etta" lastName="Kenyon" emailAddress="ketta8@email.com" AccountType="Savings" balance="7425.60"/>
  <row id="9" accountId="10028" firstName="Dorene" lastName="Unger" emailAddress="udorene9@email.com" AccountType="Checking" balance="402.60"/>
  <row id="10" accountId="10029" firstName="Gabriel" lastName="Chi" emailAddress="cgabriel10@email.com" AccountType="Savings" balance="7335.10"/>
</rows>