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".
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.
Tip:You can remove all price list elements in a database by using the loadpricelist utility -p parameter. See "loadpricelist".
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.
Important: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:
For Paymentech, dm_fusa, answer_b, and answer_s should be running. For more information, see "Configuring BRM-initiated payment processing" in BRM Managing Customers.
You must use one of the following pairs of credit card numbers and expiration dates listed in Table 8-1 for your test accounts:
Tip: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.
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:
Go to BRM_Home/source/apps/sample.
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.
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".
To get the results of your test after running sample_act:
Find the test accounts in Customer Center.
Click the Balance tab.
For detailed information about balance changes, use Event Browser.
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.
Note: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.
Caution: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:
Go to the BRM_Home/sys/test directory.
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
Note:BRM_Home/lib/pin_virtual_time_file is the standard path and file name, but you can change it.
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.
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:
|Application||Configuration File Location|
Billing and invoice utilities
To ensure that all applications respond to pin_virtual_time changes, add the entry to all the configuration files in your test BRM system.
- - pin_virtual_time BRM_Home/bin/pin_virtual_time_file
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.
After you run pin_virtual_time, you must stop and restart BRM to read in the new time:
Log on to the computer that is the server for your test BRM system. Usually, your test system should be on a single machine.
Note:Log in as something other than root.
Exit all BRM client tools, such as Customer Center and Pricing Center.
Stop and restart the CM and Oracle Data Manager.
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:
Go to the BRM_Home/apps/pin_billd directory.
At the command prompt, enter the following:
This command is a script that runs several billing utilities.
BRM creates an invoice for each active account.
Open a test account in Customer Center and go to the Payment tab.
Ensure that the Current Billing Start and End dates are what you expect.
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.
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:
In Customer Center, create a test account by using the plan you are testing.
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.
Close the test account.
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.
Go to the BRM_Home/sys/test directory.
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.
Stop and restart BRM, by using the procedure in "Stopping and Starting BRM".
Go to BRM_Home /source/apps/sample.
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.
Reopen the account in Customer Center.
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.