8 Testing Your Price List

This chapter describes the procedure for testing an Oracle Communications Billing and Revenue Management (BRM) price list. Testing is an important step to take before using the price list for customers. For information on creating a price list, see "Setting Up Price List Data".

For example, you can:

  • Test hourly usage rates by generating usage activity. If your price list specifies a usage rate of $1 per hour, and you generate 10 hours of usage, the resulting invoice should show a balance impact of $10.

  • Test the billing impact of cycle-forward rates by advancing the date within the BRM system and then running billing.

To test a price list, perform some or all of the following tasks, depending on the types of rates you must test. This chapter describes each task in detail:

For an example, see "Example Price List Test".

About Using a Test Database

Before testing a price list, set up a test database that is separate from your production database. Because you simulate account activity and time changes when you test your price list, you would create erroneous events in a production BRM database that contains real customer accounts.


You can remove all price list elements in a database by using the loadpricelist utility -p parameter. See "loadpricelist".

Creating Test Accounts

Use Customer Center to create test accounts in your test database. Note the login name for each account you create, because you will need it later.


To create accounts with your new plans, you must add them to a plan list. See "Controlling which plans and deals are available to customers" in BRM Managing Customers.

When selecting a payment method, you can select either Invoice or Credit Card. If you select Credit Card, also do the following:

  • Ensure that the necessary Data Managers and applications are properly configured and running:

  • You must use one of the following pairs of credit card numbers and expiration dates listed in Table 8-1 for your test accounts:

    Table 8-1 Example Credit Card Expiration Data

    Credit Card Number Expiration Date

    4444 1111 2222 3333


    4101 0000 0000 0000

    any expiration date


A simple cycle rate, such as a monthly fee for a service, should appear in an account's balance as soon as you create the account.

Generating Test Account Activity

Use the sample_act utility to generate activity for a test account. You use this utility to simulate a customer using a product or service without the product or service actually being available. You can then see if the activity changes the test account's balance as you expect.

Perform these tasks to generate activity with sample_act:

Running sample_act

  1. Go to BRM_Home/source/apps/sample.

  2. Edit the pin.conf file for the cm_ptr to point to your CM process. Also, edit the login type, login name, and password entries.

  3. Run the sample_act utility for each account you want to include in your test.

    The syntax for sample_act depends on the type of event you are simulating:

    • Session event: A usage event, such as hours of Internet access. If the rate depends on the passage of time, use a session event.

      For a session event, use this syntax:

      sample_act -v -e session -l login -d duration -s servicename
    • Activity event: An item or cycle fee that does not depend on time, such as a monthly fee.

      For an activity event, use this syntax:

      sample_act -v -e activity -l login -q quantity -s servicename

    Following is a description of the most common sample_act options.

    • -v: Use to run sample_act in verbose mode. In this mode, you see status messages at the command prompt, including messages that the event generated successfully or that an error occurred. There is no argument.

    • [-n RUM Name -q quantity [-u Unit]]

    • [-b event time] (as MM:DD:YY:HH:MM:SS or unixtime)

    • [-A ANI] [-D DNIS] [-Y call_type]: ANI is the source telephone number and DNIS is the destination telephone number

    • [-X int_indicator] [-O origin_gw]

    • [-N new Timezone ID String]

    • [-I termserv_id] [-P termserv_port] [-T old timezone offset]

    • -e activity|session [-c custom_subtype]: Enter activity or session.

    • -l login: Enter the login name for the test account and service for which you want to generate activity.

    • -q quantity: For an activity event, enter the quantity purchased.

    • -d duration: For a session event, enter the duration of the simulated event in seconds. The default is 3600 seconds, or one hour.

    • -s service_type -l service_login: Enter the name of the service for which you are simulating the event, such as /service/ip.

    The following example simulates using three hours of Internet service. The login is pin_user and the service is /service/ip.

    % sample_act -v -e session -l pin_user -d 10800 -s /service/ip

To test a rate that changes at different times, such as an Internet service rate with peak and off-peak rates, you can advance the system date in conjunction with running sample_act. See "Advancing the Date".

Before advancing the time, you must edit the sample_act configuration file so that sample_act responds to the changed time. See "Setting Up the pin_virtual_time Utility".

Checking Results of Running sample_act

To get the results of your test after running sample_act:

  1. Find the test accounts in Customer Center.

  2. Click the Balance tab.

  3. For detailed information about balance changes, use Event Browser.

Advancing the Date

To properly test a price list, you must simulate the passage of time. For example, you should test:

  • If accounts are billed correctly. Advance the date to the next billing cycle, then run billing and generate an invoice.

  • If a time-based discount takes effect correctly. If you have a deal that includes 90 days of free email service, for example, advance the date more than 90 days to see if the account starts being charged for the service.

  • If folds are working correctly. If a product includes 10 free hours of Internet service per month, for example, advance the date by a month or more to ensure that unused free hours do not carry over.

The pin_virtual_time utility enables you to simulate changes in the BRM system time.


If you use pin_virtual_time with a BRM system that includes Pipeline Manager, you must set the VirtualTime parameter for the DAT_BalanceBatch module to True to ensure that balances are calculated correctly.


The pin_virtual_time utility works only on a single computer. Typically, you set up a test BRM system on just one computer. If you run pin_virtual_time on a system that is distributed across multiple computers, you must carefully coordinate time changes on all the computers.

Perform the following tasks to advance the date:

Setting Up the pin_virtual_time Utility

  1. Go to the BRM_Home/sys/test directory.

  2. Run this command to create a file that pin_virtual_time requires, called pin_virtual_time_file:

    pin_virtual_time -m 0 -f BRM_Home/bin/pin_virtual_time_file 


    BRM_Home/lib/pin_virtual_time_file is the standard path and file name, but you can change it.
  3. Add the following entry to the configuration file in the BRM_Home/sys/test directory:

    -  -  pin_virtual_time  pin_virtual_time_file

    Replace pin_virtual_time_file with the path and name of the mapped file created in the previous step.

    Adding the entry to the configuration file in sys/test enables you to run pin_virtual_time from that directory. The directory from which you run pin_virtual_time must contain a configuration file with the pin_virtual_time entry.

  4. Add the entry in step 3 to the configuration file for each program you want to respond to an altered time.

    To test your price list, edit the configuration files for at least the applications listed in Table 8-2:

    Table 8-2 Configuration Files for Testing Applications

    Application Configuration File Location



    Oracle DM


    Billing and invoice utilities


    sample_act utility


    To ensure that all applications respond to pin_virtual_time changes, add the entry to all the configuration files in your test BRM system.

    Entry example:

    -  -  pin_virtual_time  BRM_Home/bin/pin_virtual_time_file 

Running pin_virtual_time

After you set up the pin_virtual_time utility, run pin_virtual_time to advance the BRM date and time.

Syntax for pin_virtual_time:

pin_virtual_time -m 2 MMDDHHMM[CC]YY.[SS]

For the string MMDDHHMM[CC]YY.[SS], enter the date and time you want BRM to use in this format: month, date, hour, minute, year, and seconds. You must enter at least two digits for the year, but you can enter four. Seconds are optional.

For example, to set the date and time to 9/3/99 and 11:30, respectively:

% pin_virtual_time -m 2 090311301999.00 

The command displays this message at the command prompt:

filename BRM_Home/lib/pin_virtual_time_file, mode 2, time: Fri Sept 03 11:30:00 1999

The time then advances normally from the new reset time.

Stopping and Starting BRM

After you run pin_virtual_time, you must stop and restart BRM to read in the new time:

  1. Log on to the computer that is the server for your test BRM system. Usually, your test system should be on a single machine.


    Log in as something other than root.
  2. Exit all BRM client tools, such as Customer Center and Pricing Center.

  3. Stop and restart the CM and Oracle Data Manager.

Generating a Test Invoice

Generate invoices for your test accounts to see if the accounts are billed correctly. Before following this procedure, you should have generated account activity and advanced the date to the beginning of the next billing cycle. Go to the Payment tab in Customer Center to find the Next Billing Start date for an account.

To run billing and generate a test invoice:

  1. Go to the BRM_Home/apps/pin_billd directory.

  2. At the command prompt, enter the following:

    % pin_bill_day 

    This command is a script that runs several billing utilities.

    BRM creates an invoice for each active account.

  3. Open a test account in Customer Center and go to the Payment tab.

  4. Ensure that the Current Billing Start and End dates are what you expect.

  5. Search for the invoice for the current account, and see that it contains the results of your test. See "Displaying invoices" in BRM Designing and Generating Invoices.

Example Price List Test

This example takes you through the steps for testing a plan that includes the following:

  • A monthly Internet access fee of $9.95.

  • An hourly fee of $2.00 for prime-time Internet service usage. Prime time is 8:00 a.m. to 6:00 p.m. weekdays.

  • An hourly fee of $1.00 for off-peak Internet service usage. This includes nights and weekends.

You can test this plan as follows:

  1. In Customer Center, create a test account by using the plan you are testing.

  2. Go to the Balance tab. The current balance for the US Dollar resource should be $9.95, because the monthly access fee impacts the balance right away.

  3. Close the test account.

  4. Set up the pin_virtual_time utility, by using the procedure in "Setting Up the pin_virtual_time Utility". Ensure that you at least add the pin_virtual_time entry to the configuration files for the Connection Manager, Oracle Data Manager, and sample_act utility.

  5. Go to the BRM_Home/sys/test directory.

  6. Change the BRM system time so it is close to the time when one rate ends and the other begins. For example, set the time to 6:00 a.m. the following day.

    If you created the account on May 1, 1999, you would run the following command to change BRM's system time to 6:00 a.m. the next morning:

    pin_virtual_time -m 2 0502060099 -l pin_user 

    In the above command, pin_user is the login assigned to the test account.

  7. Stop and restart BRM, by using the procedure in "Stopping and Starting BRM".

  8. Go to BRM_Home /source/apps/sample.

  9. Generate four hours of Internet access activity for the account by running this command:

    sample_act -v -e session -r ip/dialup/async/hourly -s /service/ip -d 14400 -l pin_user 

    In the above command, ip/dialup/async/hourly is the rate category, /service/ip is the service, 14400 is four hours in seconds, and pin_user is the login name for the account.

  10. Reopen the account in Customer Center.

  11. Go to the Balance tab.

    The current balance for the US Dollar resource should now be $15.95. The sample_act command should have generated two hours of Internet access at the off-peak fee of $1 and two hours at the prime-time fee of $2. If you set up the rates correctly, this adds $6.00 to the previous balance of $9.95.