Definition

The GenRocket runtime application interface (API) allows programmers to access the GenRocket runtime to directly modify and create scenarios from their own programs. Programmers will have the following control over a Scenario:

  • Modify Domains, Attributes, Generators and Receivers
  • Add Domains, Attributes, Generators and Receivers to an existing Scenario


The diagram below shows the GenRocket components that allow an engineer to interface with the GenRocket API via their own application and an interface module. 


Here are the component descriptions:

  • The GenRocket Scenario component contains instructions to instantiate Domains, Attributes, Generators, and Receivers that will generate test data in real-time.  
  • The GenRocket API (Application Interface) component defines the method interfaces that must be implemented to manipulate a GenRocket Scenario.
  • The GenRocket Manual component is a class the implements the method interfaces defined within the GenRocket API.
  • The Engine Payload component is a class that receives and morphs JSON payloads into parameters and method calls within the EngineManual class.
  • The GenRocket Binary Runtime component is a Java bytecode runtime and contains all other components described in the diagram.
  • The GenRocket Realtime REST Engine component allows the communication to the GenRocket API via Restful web services.
  • The GenRocket Realtime Socket Engine component allows the communication to the GenRocket API via Socket requests.
  • The GenRocket Engine component executes the instructions within a given GenRocket Scenario to generate real-time test data.   



Introductory Video Overview

Install Groovy 2.0+ (only required for GenRocket API usage)

If you are going to leverage the GenRocket API, you will need to install Groovy. If you do not plan to use the GenRocket API, you do not need to install Groovy. You can install Groovy from this link.

API Concrete Interfaces (see Index Of API Methods)

There are three concrete interfaces for accessing the GenRocket API

  • The GenRocket Binary Runtime
  • The GenRocket Realtime Socket Engine
  • The GenRocket Realtime REST Engine


The GenRocket Binary Runtime 

Programmers developing applications with languages that compile down to a Java binary (e.g. Groovy, Scala, Jython, Kotlin, Clojure, Ceylon, Quercus) can directly access the GenRocket binary runtime.


The GenRocket Realtime Socket Engine 

Programmers developing applications that cannot directly access the GenRocket binary runtime may do so by launching the GenRocket Socket Engine and make method calls via a socket.  Each socket call requires sending a request payload as well as receiving a response payload.  All payloads are in JSON.   


The GenRocket Realtime REST Engine

Programmers developing applications that cannot directly access the GenRocket binary runtime may do so by launching the GenRocket REST Engine and make method calls via Restful web services.  Each socket call requires sending a request payload as well as receiving a response payload.  All payloads are in JSON.


Attribute Naming Convention

An attributeName has the format of domainName.attributeName.  If the domainName is not contained as the prefix of an attributeName, the domain will not be found.

Examples:

  • User.lastName
  • Organization.title
  • Department.name


Generator Naming Convention

A generatorName must be the conical form of the Generator's name.

Examples:

  • com.genRocket.generator.RangeGen
  • com.genRocket.generator.ListGen
  • com.genRocket.generator.NameGen