The Home Subscriber Server (HSS) simulator provides an interface for Diameter Sh testing only. It does not simulate all interfaces provided by a full HSS. It also does not provide full support for user-data manipulation.

Simulator modes

The HSS simulator can be run two different modes:

  1. Non-persistent — Accounts are read from a file at startup and never written back to the filesystem. All account updates are lost when the simulator is stopped.

  2. Persistent — A database is used. Data files must be provided to populate the tables with initial data. Accounts persist across simulator restarts.

Starting the simulator

Use the following commands to start the simulator:

Mode Command

Non-persistent

./hss-simulator.sh

Persistent

First time, to populate database:

./hss-simulator.sh -db -a config/accounts.xml

With a populated database:

./hss-simulator.sh -db

Configuring the database

To control whether the database is started in-process or connected to through a socket, see the hss-database.properties file. This file contains comments that describe how to start and configure the hsqldb database.

Adding artificial latency

The simulator can be configured to introduce a delay before responding to a request, to better simulate a real server. The delays introduced will be generated to have a normal distribution with the specified mean and standard deviation. As a rule of thumb, the standard deviation should be no more than 1/4 of the mean.

Switch What it sets Default

-l

mean value of the artificially introduced latency, in ms

300

-v

standard deviation of the latency, in ms

50

Configuring logging

The default logging configuration is write-abbreviated INFO-level output to the console, and DEBUG-level output to a file named hss-simulator.log.

To change this configuration, edit the log4j.properties file in the config directory.

Previous page Next page