18 Using the Simulator to Test ECE

This chapter provides instructions for using the simulator when testing an Oracle Communications Billing and Revenue Management Elastic Charging Engine (ECE) implementation.

About the Simulator

The simulator emulates the role of a client application, such as a network mediation client application, sending requests to ECE. The simulator allows you to send usage requests, query requests, or update requests to ECE for processing.

For ECE to process requests, it must have data in its customer, pricing and configuration caches. The simulator works in conjunction with the loader tool which generates and loads sample data into ECE caches. The simulator can also be used with the data migration loaders as long as the customers being loaded are compatible by having numeric, sequential IDs.

The simulator randomly chooses different types of customers when sending requests and can control the number of requests sent per second for the entire data grid. You can specify the attributes of the customers in the requests before running each sample workload. For information about the attributes you can use to set up a workload, see BRM Elastic Charging Engine Java API Reference BRM Elastic Charging Engine Java API Reference. For information about how to edit parameters for the sample workload, see "Configuring the Simulator".

Configuring the Simulator

The simulator configuration is loaded through the ECE_home/config/management/test-tools.xml file under the simulator configuration section. You can configure this file directly by using a text editor before the charging servers are started or you can configure it by using a JMX editor, such as JConsole, after the charging servers are started.

To configure the simulator by using a JMX editor:

  1. Access the ECE MBeans:

    1. Log on to the driver machine.

    2. Start the ECE charging servers (if they are not started).

    3. Start a JMX editor, such as JConsole, that enables you to edit MBean attributes.

    4. Connect to the ECE charging server node set to start CohMgt = true in the ECE_home/oceceserver/config/eceTopology.conf file.

      The eceTopology.conf file also contains the host name and port number for the node.

    5. In the editor's MBean hierarchy, expand the ECE Configuration node.

  2. If necessary, create a simulator instance as follows:

    1. Expand test-tools.simulators.

    2. Expand Operations.

    3. Select addSimulatorConfiguration.

    4. In the name parameter, enter a name for the simulator instance.

    5. Click the addSimulatorConfiguration button.

  3. Expand test-tools.simulators.Instance_Name, where Instance_Name is the name of the simulator instance you want to configure.

  4. Expand Attributes.

  5. Specify values for the simulator configuration attributes you want to change.

Configuring the Simulator for an ECE Integrated Implementation

The simulator is often used on a single server or standalone ECE installation. You can configure the simulator for an ECE integrated installation in which ECE is connected to BRM and simulates requests that will send charging results to BRM.

To configure the simulator for an integrated installation:

  1. Create or extend your ECE request specification file.

    You can use pre-defined or custom request specification files.

  2. Point the simulator to the request specification file you want to use.

    See "Pointing the Simulator to a Request Specification File".

  3. Configure the simulator to populate the payload fields of the usage requests created. See "Configuring the Simulator to Populate Payload Fields".

Pointing the Simulator to a Request Specification File

To point the simulator to the request specification file you want to use:

  1. Examine the request specification loaded into ECE.

    Request specifications are uniquely identified by a combination of two parameters:

    • Version

    • EventType

  2. Configure the simulator by doing the following.

    You can do this online by using a JMX editor (setting attributes of ECE Configuration:type=test-tools.simulator MBean) or offline by editing the test-tools.xml file.

    1. Set the ProductType to match an available ProductType from the request specification file (for example, TelcoGsmTelephony).

    2. Set the EventType to match the one in the request specification file (for example, ConvergentVoice).

    3. Set the Version to match the one in the request specification file (for example, 1.0).

Based on these three parameters, the simulator identifies the target request specification when building the requests. It creates requests with the payload fields defined in the request specification file to which it points. It does not populate payload fields. To populate payload fields, see "Configuring the Simulator to Populate Payload Fields".

Configuring the Simulator to Populate Payload Fields

By default, the simulator does not populate payload fields. The created payload will not have any values, except for the default ones. The mandatory sub-blocks (those with cardinality of at least 1) are created but not populated.

You must provide values for all mandatory fields. You may also want to provide values for some optional fields, or override the default ones.

To provide payload values:

  1. Using a JMX editor, for each field you want configured, call the addPayloadAttribute method of ECE Configuration:type=test-tools.simulator Mbean.

  2. Provide the name and value of the field you want populated in the request.

    Or using a text editor, edit the test-tools.xml file to include the fields you want.

With the payload attributes configured, when constructing requests, the simulator examines the request specification and places all relevant attributes into the payload.

For example, if a CALLED_ID attribute of the request payload has been set and the request specification defines a CALLED_ID attribute for Initiate requests only, all Initiate requests sent by the simulator have a payload with the specified CALLED_ID, but Terminate requests do not have a CALLED_ID attribute in their payload.

Using the Simulator with BRM

When you use the simulator for generating usage for an event type, and you want to load the generated rated events into BRM, ensure that you do the following when configuring the request specification file to be used with the simulator:

  1. Declare your event type name as "USAGE".

  2. Associate the "USAGE" event type with an existing BRM event type by creating an external mapping. For example:

    EventType "USAGE" -external "/event/delayed/session/telco/gsm"
    

By doing this, you can use the simulator to generate events that can be loaded into BRM during end-to-end testing of ECE with BRM.

About Running a Sample Workload

You run a sample workload by using the simulator. Running a sample workload involves sending a specified number of requests to ECE so that ECE can process the requests. When processing requests, ECE uses data (such as customer data and pricing data) loaded in its caches. Running a sample workload can reveal information about the throughput and the latency of your hardware and network equipment.

Loading Required Cache Data

After you install ECE and start the ECE charging server processes, the ECE caches in the Coherence grid are empty. You must load data in ECE caches that are required for processing requests.

You can use the simulator loader utility (loader) to load data or you can use other data-loading utilities such as the configLoader, customerLoader, and pricingLoader to load data. The loader utility loads customer, pricing, and configuration sample data.

Customizing Your Sample Workload

You can customize the configuration of your sample workload, such as increase the number of requests to send to ECE, by using the configuration service.

To customize your sample workload:

  1. Access the ECE MBeans:

    1. Log on to the driver machine.

    2. Start the ECE charging servers (if they are not started).

    3. Start a JMX editor, such as JConsole, that enables you to edit MBean attributes.

    4. Connect to the ECE charging server node set to start CohMgt = true in the ECE_home/oceceserver/config/eceTopology.conf file.

      The eceTopology.conf file also contains the host name and port number for the node.

    5. In the editor's MBean hierarchy, expand the ECE Configuration node.

  2. Expand test-tools.common.

  3. Expand Attributes.

  4. Specify values for the workload attributes you want to change.

    For descriptions of each attribute, see BRM Elastic Charging Engine Java API Reference.

Running a Sample Workload

You use the simulator to run a sample workload.

See "Configuring the Simulator" for instructions on configuring the simulator.

To run a sample workload:

  1. Change directory to the bin directory.

    cd ECE_home/oceceserver/bin
    
  2. Start the Elastic Charging Controller (ECC) application.

    ./ecc
    
  3. Start the ECE charging servers.

    > start server
    
  4. Start the loader.

    > start loader
    

    The loader generates and loads the sample data and loads the request specification files.

  5. Start the simulator.

    > start simulator
    
  6. Initialize the simulator.

    > init simulator
    

    The simulator obtains the public user identity map so that it can provide the BRS server with user ID routing information.

  7. Run the sample workload.

    > simulate simulator
    

    It will take a few seconds to run the workload.

  8. Look in the invocation.log file to see statistics about running that sample workload.

About the loader Utility

The loader utility is a data-loading utility used only when running a sample workload using the simulator. The loader loads customer, pricing, and configuration sample data that the simulator is designed to use for running sample workloads. The loader also loads sample request specification files that are used to validate requests that are sent by the simulator.

Note:

The ECE sample programs do not work well with data loaded by the simulator loader utility.

Generating Customer Data for a Workload

The customer file generator is a utility that enables you to create customer data without using BRM. Use the customer file generator for generating customer data used for running a workload with the simulator. For information about customer file generator, see "About the Customer File Generator".

To generate customer data for a workload using customer file generator:

  1. Access the ECE MBeans:

    1. Log on to the driver machine.

    2. Start the ECE charging servers (if they are not started).

    3. Start a JMX editor, such as JConsole, that enables you to edit MBean attributes.

    4. Connect to the ECE charging server node set to start CohMgt = true in the ECE_home/oceceserver/config/eceTopology.conf file.

      The eceTopology.conf file also contains the host name and port number for the node.

    5. In the editor's MBean hierarchy, expand the ECE Configuration node.

  2. Expand test-tools.customerGenerator.

  3. Do one of the following:

    • To use simple customer structures, configure the customer file generator to use one of the available customer configurations.

      The utility programmatically creates the customer structures according to the ECE customer data XSD file.

    • To create complex customer structures, configure the customer file generator to use the customer template.

      You manually set the mandatory fields, sequencing of tags, and so on as required by the ECE customer data XSD file.

  4. Start ECC.

    ./ecc
    
  5. Start the ECE charging servers.

    > start server
    
  6. Start the customer file generator.

    > start customerGenerator
    

    The customer file generator generates the customer data files according to the customer configuration or customer template you configured.

  7. Start the customerLoader utility.

    > start customerloader
    

    The customerLoader loads the customer data files into ECE.