The Rhino projects require test configuration file which contain configuration properties and must be located in load testing project’s classpath or in the file system. The configuration file’s path will be passed to the factory method while creating a new Simulation instance:

public static void main(String... args) {
  Simulation.create("classpath:///", SIM_NAME).start();

An example simulation configuration might look as follows:


# User Authentication

# Influx DB Integration

# Grafana Integration
grafana.token="<token with write access obtained from Grafana>"


Rhino simulations are environment-aware so you can start your simulations targeting a certain environment by passing the application parameter with -Dprofile=DEV. Environment-aware configurations are prefixed with <env>.<configuration>=<configuration value>:


Supported environment profiles, in uppercase, DEV, STAGE, PROD whereas the prefix in properties file are all lowercase.

In addition to the configurations in properties file, there are also configuration options that are available in SDK annotations. Let us take a closer look at these options:

Simulation Configuration

Property Description  
packageToScan Package name where annotated simulation entities are to be located. Wildcards not supported. The simulation scan is not recursive. Config Property
name Name of the Simulation used in reporting. @Simulation
userRegion User region. @Simulation
maxNumberOfUsers Max. number of different users, employed in simulation. Your data source might contain more users than the number defined by maxNumberOfUsers. If it has less than maxNumberOfUsers, then all users will be used. @Simulation
durationInMins Simulation duration in minutes. @Simulation

OAuth Configuration

If your environment relies on OAuth framework, you can leverage Rhino’s OAuth support to enable OAuth authorization and authentication:

Property Description  
{env}.users.source file or vaultare valid values. file enables CSV based user source. Vault support is in Beta. Config Property
{env}.oauth2.endpoint Authorization server endpoint. Config Property
{env}.oauth2.clientId Client id for user login. Config Property
{env}.oauth2.clientSecret Client secret for user login. Config Property
{env}.oauth2.apiKey Api key, if the service behind the Gateway. Config Property
{env}.oauth2.grantType Grant type. Config Property
{env}.oauth2.userSource Path to user source e.g classpath:///test_users.csv Config Property

If the testing endpoint require a service token, you can enable service authorization support in configuration properties. For detailed information to service-to-service authentication please refer to S2S Authentication section.

Property Description  
{env}.oauth2.service.authentication true or false to enable service token authentication. If enabled, client service will be logged in and the service token will be sent to the resource server. Config Property
{env}.oauth2.service.clientId Client id of the service. Config Property
{env}.oauth2.service.clientSecret Client secret to log in the client against authorization server. Config Property
{env}.oauth2.service.grantType grant type, “authorization_code” is the only supported grant type as of 1.7.1 Config Property
{env}.oauth2.service.clientCode Client code to log in the client against authorization server. Config Property
{env}.oauth2.bearer Bearer token type, “user” for user token or “service” for service token. Config Property
{env}.oauth2.headerName The name of the custom header e.g X-User-Token if bearer is used for service token. Config Property

Influx DB Configuration

Property Description  
db.influx.url Influx DB endpoint. Config Property
db.influx.dbName Database name. Config Property
db.influx.username Influx DB username. Config Property
db.influx.password Influx DB Password. Config Property
db.influx.batch.actions The number of metrics sent in batches. Config Property
db.influx.batch.duration Wait time till the batch will be sent regardless of the size of it. Config Property
db.influx.policy Retention policy found in Influx DB. Config Property

In addition to the configurations above, the Influx DB support must be enabled by adding @Influx annotation to the Simulation at class-level.

Grafana Configuration

Property Description  
grafana.endpoint Grafana endpoint, e.g http://localhost:3000 . Config Property
grafana.token Grafana access token. Config Property

In addition to the configurations above, the Grafana support must be enabled by adding @Grafana annotation to the Simulation at class-level.

Http Client Configurations (from 1.6.0)

Property Description  
http.maxConnections Number of connections the HTTP client can handle in reactive mode. Config Property
http.connectTimeout Return the maximum time in millisecond an the Http client can wait when connecting to a remote host. Config Property
http.readTimeout The maximum time in millisecond an Http client can stay idle. Config Property
http.handshakeTimeout Return the maximum time in millisecond an Http client waits until the client-service handshake is completed. Config Property
http.requestTimeout Return the maximum time in millisecond an Http client waits until the response is completed. Config Property

Accessing Configurations in Simulations

The configurations can be access through SimulationConfig instance in Simulation instances which provides static getter methods.