17 Overview of ECE Testing Tools

This chapter describes Oracle Communications Billing and Revenue Management Elastic Charging Engine (ECE) testing tools included with the ECE Software Development Kit (SDK) and the ECE data-loading utilities.

About ECE Testing Tools

You can use the following testing tools when implementing ECE in a charging system:

  • simulator

    The simulator emulates the role of a client application, such as a network mediation software program, sending requests to ECE. See "About the Simulator".

  • Customer file generator

    The customer file generator enables you to create customers without using Oracle Communications Billing and Revenue Management (BRM). See "About the Customer File Generator".

  • Query tool

    The query tool provides access to ECE cache content by way of CohQL, a Coherence query utility that uses an SQL-like language. See "Using the Query Tool to Test ECE".

  • Data-loading utilities

    See "Using Data-Loading Utilities".

  • Performance MBean

    You can use the PerformanceMonitor MBean to monitor the performance of your ECE deployment during testing.

    See "About the Performance MBean".

When testing ECE, you can change ECE's current time and date, without affecting the operating system time and date. See "Changing Time and Date to Test ECE".

About the ECE SDK

When you install the ECE server software, the ECE SDK is installed in the ECE_home/ocecesdk directory. ECE_home is the directory in which ECE is installed.

The ECE SDK contains the following:

  • Client libraries that enable your applications to connect to the cluster and build usage requests.

  • Sample programs that demonstrate how to use the ECE client APIs for sending requests to ECE. See "About the ECE Sample Programs" for information about using the sample programs.

About the Simulator

The simulator emulates the role of a client application, such as a network mediation software program, sending requests to ECE. The simulator allows you to send usage requests, query requests, update requests, or policy requests to ECE for processing. You can run sample workloads for testing latency and throughput of your system. For information about how the simulator works and how to use it, see "Using the Simulator to Test ECE".

About the Customer File Generator

The customer file generator enables you to create customers without using BRM.

The customer file generator creates ECE customer XML files according to provided specifications.

You run the customer file generator from Elastic Charging Controller (ECC).

The customer file generator is an ECE node specified in the ECE topology file (ECE_home/oceceserver/config/eceTopology.conf).

For information about using the customer file generator, see "Generating Customer Data for a Workload".

About the Query Tool

The query tool, query.sh, provides access to ECE cache content by way of CohQL, a Coherence query utility that uses an SQL-like language.

Important:

The ECE data model within the Coherence cache is subject to change. Oracle does not recommend that client applications directly use the Coherence API or the query tool for accessing ECE cache data. For querying ECE cache data, write your client applications to use the ECE APIs such as the balance query and authentication query APIs.

You can use the query tool as follows:

  • For debugging

  • For development

  • For learning about the ECE customer domain model

  • For generating reports

For information about how to use the query tool, see "Using the Query Tool to Test ECE".

About Data-Loading Utilities

See the following topics for information about data-loading utilities:

About loader

Use the loader utility to load sample data into ECE caches required for processing requests. The loader utility loads sample pricing-related configuration data, sample pricing data, and sample customer data. The loader utility also loads sample request specification files that are used to validate requests that are sent by the simulator. For information about how to use the loader utility when testing ECE, see "Using the Simulator to Test ECE".

About configLoader

Use the configLoader utility to load the mediation specification data required for Diameter Gateway into ECE. See "About Configuration Data".

The configLoader utility loads the mediation specification file into configuration objects in the ECE cluster-replicated cache. In the ECE_home/oceceserver/config/management/migration-configuration.xml file, the configObjectsDataDirectory parameter specifies the path to the mediation specification file that is supplied (as ready-to-use configuration) when you install ECE. The mediation specification file is loaded into the ServiceSpec repository, a cache in the cluster where the mediation specification can be accessed by any Java Virtual Machine (JVM) process that is running in the cluster.

The configLoader utility also deploys the RADIUS mediation specification file into the ECE cluster.

Any previous RADIUS mediation specification that was in the ECE cluster is overwritten. See ”Configuring the ECE System” in ECE System Administrator's Guide for more information.

About customerLoader

Use the customerLoader utility to load customer data into ECE from XML files.

In a test environment, use the customerLoader utility to load sample customer data into the ECE customer cache from XML files. See "About Customer Data".

In a production environment, use the customerLoader utility with the -incremental parameter to load customer data incrementally.

Caution:

Do not run the customerLoader utility without the -incremental parameter in a production environment.

About the ECE Customer XML Data Files

ECE customer XML data files are used by the customerLoader utility to load customer data into ECE.

ECE customer XML data files contain customer data in ECE XML data file format.

Use the customer file generator to create ECE customer XML files. See "Generating Customer Data for a Workload" for more information.

About the ECE Credit Profile XML Data Files

ECE credit profile XML data files are used by the customerLoader utility to load sample system wide credit profiles into ECE.

ECE includes sample system wide credit profiles in ECE_home/oceceserver/sample_data/config_data/CreditProfile.xml.

About pricingLoader

Use the pricingLoader utility to load sample pricing data into the ECE pricing cache from XML files.

Important:

When you use Pricing Design Center (PDC), you run the ECE Pricing Updater for loading pricing data into ECE. Pricing Updater loads pricing data into ECE from the Java Message Service (JMS) queue to which PDC publishes the data.

Do not run both the pricingLoader utility and Pricing Updater on the same ECE system.

Use the pricingLoader utility only on a standalone installation when PDC is not used.

You start the pricingLoader utility by running an ECC command. When started, and when configured to access the XML files, the pricingLoader utility loads the data in the XML files into the ECE pricing cache and then stops.

It may be useful during testing or development to manually load pricing data from the XML file. For information about configuring the pricingLoader utility, see "Configuring pricingLoader".

About the Pricing XML Data File

The pricingLoader utility uses the same XML data format as PDC. You create the XML files by using the ImportExportPricing utility, a PDC utility. The pricing XML data file contains pricing data exported from the PDC database. For information about creating XML files for pricing data, see PDC User's Guide.

About the Pricing XML Schema File

The pricing XML schema file (XSD file) is the template for the pricing XML data file. The XML data file must conform to the structure of the schema file. PDC performs the XSD validation on the pricing XML files that it generates. XSD files are available in their respective directories in the PDC_home/apps/xsd directory, where PDC_home is the directory in which PDC is installed. For information about pricing XML schema files, see PDC User's Guide.

About Sample Programs

The ECE SDK includes sample programs that demonstrate how to use the ECE API for sending requests to ECE.

You use sample programs in the following ways:

  • Use the sample programs as code samples for calling the ECE APIs.

  • Use the sample programs as code samples for writing custom applications.

  • Run sample programs to send requests to ECE and receive responses asynchronously.

    The sample programs print information on the messages exchanged.

  • Use the sample program scripts as a guide for integration of the ECE client into your build system (Maven, Ant, and so on).

For information about how to use the sample programs, see "About the ECE Sample Programs".

Using Data-Loading Utilities

This section describes ECE data-loading utilities.

Using configLoader

This section describes how to configure the configLoader utility and use it to load the mediation specification configuration data required for Diameter Gateway into ECE.

Configuring configLoader

To configure the configLoader utility:

  1. Verify the configuration in the mediation specification file.

    See "Editing the Mediation Specification File".

  2. Open the ECE_home/oceceserver/config/management/migration-configuration.xml file.

  3. Set the configObjectsDataDirectory parameter to the path of the directory that contains the ECE mediation specification file.

    The configLoader utility loads the mediation specification file from this directory into configuration objects in the ECE cluster-replicated cache.

    By default, this parameter is set to ECE_home/oceceserver/sample_data/config_data.

  4. Save and close the file.

Loading Configuration Data with configLoader

To load configuration data with configLoader:

  1. Change directory to the ECE_home/oceceserver/bin directory.

  2. Start ECC:

    ./ecc
    
  3. If your charging servers are not running, start them:

    start server
    
  4. Run the following command:

    start configLoader
    

Using pricingLoader

This section describes how to configure the pricingLoader utility and use it to load the sample pricing data into the ECE pricing cache.

Important:

When you use Pricing Design Center (PDC), you run the ECE Pricing Updater for loading pricing data into ECE. Pricing Updater loads pricing data into ECE from the JMS queue to which PDC publishes the data.

Do not run the pricingLoader utility and Pricing Updater on the same ECE deployment.

Use the pricingLoader utility only on a standalone installation when PDC is not used.

Configuring pricingLoader

To configure the pricingLoader utility:

  1. Open the ECE_home/oceceserver/config/management/migration-configuration.xml file.

  2. Set the pricingDataDirectory parameter to the path of the directory that contains the ECE pricing component XML data file.

    The pricingLoader utility loads the pricing data in the XML data files published to this directory into ECE caches.

    By default, this parameter is set to ECE_home/oceceserver/config/management/sample_data/pricing_data.

  3. Save and close the file.

Loading Pricing Data with pricingLoader

To load sample pricing data with pricingLoader:

  1. Change directory to the ECE_home/oceceserver/bin directory.

  2. Start ECC:

    ./ecc
    
  3. If the charging server nodes are not running, start them and load configuration data:

    start server
    start configLoader
    
  4. Run the following command, which loads the pricing data:

    start pricingLoader
    

Using customerLoader

This section describes how to configure the customerLoader utility and use it to load the sample customer data such as credit profiles, offer profiles, and product cross-reference data from XML files.

Configuring customerLoader

To configure the customerLoader utility:

  1. Open the ECE_home/oceceserver/config/management/migration-configuration.xml file.

  2. Set the configObjectsDataDirectory parameter to the path of the directory that contains the credit profile and offer profile XML data files.

    The customerLoader utility loads the sample profile data from the XML data files in this directory into the ECE customer cache.

    By default, this parameter is set to ECE_home/oceceserver/sample_data/config_data.

  3. Set the productOfferingCrossRefFilePath parameter to the path of the directory for the product-offering cross-reference XML data file.

    The customerLoader utility loads the product-offering cross-reference data from the XML data files in this directory into the ECE customer cache.

    By default, this parameter is set to ECE_home/oceceserver/config/management/sample_data/customer_data.

  4. Set the customerDataDirectory parameter to one of the following:

    • To load the sample customer data files in ECE, specify the path of the directory for the ECE customer XML data file.

      The customerLoader utility loads the customer data in the XML data files published to this directory into the ECE customer cache.

      By default, this parameter is set to ECE_home/oceceserver/config/management/sample_data/customer_data.

    • To incrementally load the customer data from BRM into ECE, specify the schema from which the data has to be loaded into ECE. The schema number and the corresponding schema name are found in the connectionconfiguration section of the ECE_home/config/management/charging-settings.xml file. For example, if the schema number is 1, the corresponding schema name is customerUpdater1.

  5. Set the customerXmlPattern parameter to the pattern of the customer XML data file name that you want customerLoader to load. The files with a name that starts with this pattern are loaded.

    By default, this parameter is set to customer.

  6. Set the remoteWmThreads parameter to the number of parallel work manager threads to be used for the customerLoader utility.

    By default, this parameter is set to 1.

  7. Set the batchSize parameter to the number of customers to put into the repository in one put operation.

    Use batchSize to optimize performance of put operations into the repository. The more customers you insert into the repository in one put operation (rather than inserting each one individually), the better the performance.

    By default, this parameter is set to 5000.

  8. Save and close the file.

Loading Customer Data with customerLoader

Note:

Do not use this procedure to load data in a production environment.

To load customer data:

  1. Change directory to the ECE_home/oceceserver/bin directory.

  2. Start ECC:

    ./ecc
    
  3. If your charging server nodes are not running, start them and load configuration data and pricing data:

    start server 
    start configLoader
    start pricingLoader
    
  4. Run the following command, which loads the sample customer data:

    start customerLoader
    

Loading Customer Data Incrementally with customerLoader

Note:

Do not run the customerLoader utility without the -incremental parameter in a production environment.

For incremental loading, the schema from which the loading has to be performed must be specified. On a system with multiple schemas, run the customerLoader utility for each schema.

The schema number and the corresponding schema name are found in the connectionconfiguration section of the ECE_home/config/management/charging-settings.xml file. For example, if the schema number is 1, the corresponding schema name is customerUpdater1.

To load customer data:

  1. Start ECC:

    ./ecc
    
  2. If your charging server nodes are not running, start them and load configuration data and pricing data:

    start server
    start configLoader
    start pricingLoader
    start CustomerUpdater
    
  3. Create prepopulated tables to load only preselected customer data. For more information, see "Creating Prepopulated Distribution Tables".

  4. Run the following command, which loads the customer data incrementally:

    start customerLoader -incremental customer_updater_schema_name
    

    where customer_updater_schema_name is the schema name specified for Customer Updater in the connectionconfiguration section of the ECE_home/config/management/charging-settings.xml file.

    For Example:

    start customerLoader -incremental customerUpdater1
    

About the Performance MBean

You can use the PerformanceMonitor MBean to monitor the performance of your ECE deployment. You can monitor the CPU usage of server nodes and client during your testing.

For example, when building charging extensions, you can run ECE without your extensions and use the methods to see how much CPU time is used. You can then run ECE with your extensions, and use the methods again to see how much CPU time is used. By comparing the CPU times, you can derive the additional time spent by your extension.

The following PerformanceMonitor MBean methods are available:

  • The startTracking CPU() method starts tracking CPU usage for the running process.

  • The stopTrackingCPU() method stops tracking CPU usage for the running process. This method returns CPU utilization between 0 and 1 where 0 means 0% CPU usage and 1 means 100% CPU usage.

  • The getTrackedCPU() method gets the last tracked CPU usage between [0, 1] if a previously tracked CPU usage is available. If a previously tracked CPU usage is not available, -1 is returned.

The simulator exposes the throughput information through the getLastThroughput() method. The getLastThroughput() method gets the throughput number from the last successfully completed simulation run. If completed simulation runs do not exist or if a simulation run is in progress, -1 is returned.

Changing Time and Date to Test ECE

You can change ECE's current time and date, without affecting the operating system time and date, to test time-sensitive functions associated with Rated Event Formatter and Diameter Gateway in ECE.

Caution:

Changing the time and date introduces the possibility of corrupting data. Do not change the time and date in a production database.

For example, you can change ECE's current time and date to test the following:

  • Whether accounts are billed correctly. If you advance the date in BRM to the next billing cycle to test if the accounts are billed correctly, you must advance the date in ECE to the same date as set in BRM. This ensures that the events rated by ECE on that day are sent to BRM with the same date as set in BRM so that the events can be billed for the next billing cycle.

  • Whether customer's spending limit is reported correctly. If a charge offer includes a conditional balance impact and the conditional balance impact is valid only for a day, you can advance the date by a day to ensure that when the Spending-Limit-Report-Request (SLR/SLA) request is received, the spending limit for the next day is reported.

  • Whether events are rerated correctly. You can advance the date in ECE to store rated events in the Oracle NoSQL database data store with the future date to ensure that they are rerated when rerating is run in BRM for the future date.

To change the time and date to test ECE:

  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 charging.server.

  3. Expand Attributes.

  4. Specify the values for the following attributes:

    • virtualTimeMode. Enter one of the following values:

      • 0. Use this to reset the time to ECE's current time. Time is changed to the operating system time.

      • 1. Use this to set the time as a constant time. Time is frozen at the specified time until this value or the time you set is changed.

      • 2. Use this to set the time to change every second. Time is changed to the time specified, and then advances one second every second.

    • virtualTime. Enter the time and date in the following format: YYYY-MM-DDTHH:mm:ss.SSS. For example, to set the time and date to 11:30:02:600 on September 03, 2016, enter 2016-09-03T11:30:02.600.

After you change the time and date, perform testing as needed. You can also change the time and date between testing stages. After completing testing, reset the time to ECE's current time and perform database cleanup if needed.