How-To Use the SAP BusinessObjects Planning and Consolidation (BPC) Toolkit for LoadRunner

31
2 SAP BusinessObjects EPM RIG How- To Guide How-To Use the SAP BusinessObjects Planning and Consolidation(BPC) Toolkit for LoadRunner Applicable Releases: SAP BusinessObjects Planning and Consolidation 7.0, version for SAP NetWeaver Platform SAP BusinessObjects Planning and Consolidation 7.0, version for the Microsoft Platform SAP BusinessObjects Planning and Consolidation 5.1, version for the Microsoft Platform IT Practice / Topic Area: Performance Testing Scalability Testing Version 0.97.1 July 2009

Transcript of How-To Use the SAP BusinessObjects Planning and Consolidation (BPC) Toolkit for LoadRunner

Page 1: How-To Use the SAP BusinessObjects Planning and Consolidation (BPC) Toolkit for LoadRunner

2

SAP BusinessObjectsEPM RIGHow-To Guide

How-To Use the SAPBusinessObjects Planning andConsolidation(BPC) Toolkit forLoadRunner

Applicable Releases:

SAP BusinessObjects Planning and Consolidation 7.0, version for SAPNetWeaver Platform

SAP BusinessObjects Planning and Consolidation 7.0, version for theMicrosoft Platform

SAP BusinessObjects Planning and Consolidation 5.1, version for theMicrosoft Platform

IT Practice / Topic Area:Performance TestingScalability Testing

Version 0.97.1

July 2009

Page 2: How-To Use the SAP BusinessObjects Planning and Consolidation (BPC) Toolkit for LoadRunner

© Copyright 2009 SAP AG. All rights reserved.

No part of this publication may be reproduced or

transmitted in any form or for any purpose without the

express permission of SAP AG. The information containedherein may be changed without prior notice.

Some software products marketed by SAP AG and its

distributors contain proprietary software components of

other software vendors.

Microsoft, Windows, Outlook, and PowerPoint are

registered trademarks of Microsoft Corporation.

IBM, DB2, DB2 Universal Database, OS/2, Parallel

Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390,OS/400, iSeries, pSeries, xSeries, zSeries, z/OS, AFP,

Intelligent Miner, WebSphere, Netfinity, Tivoli, Informix,

i5/OS, POWER, POWER5, OpenPower and PowerPC are

trademarks or registered trademarks of IBM Corporation.

Adobe, the Adobe logo, Acrobat, PostScript, and Reader

are either trademarks or registered trademarks of Adobe

Systems Incorporated in the United States and/or other

countries.

Oracle is a registered trademark of Oracle Corporation.

UNIX, X/Open, OSF/1, and Motif are registered

trademarks of the Open Group.

Citrix, ICA, Program Neighborhood, MetaFrame,WinFrame, VideoFrame, and MultiWin are trademarks or

registered trademarks of Citrix Systems, Inc.

HTML, XML, XHTML and W3C are trademarks or

registered trademarks of W3C®, World Wide WebConsortium, Massachusetts Institute of Technology.

Java is a registered trademark of Sun Microsystems, Inc.

JavaScript is a registered trademark of Sun Microsystems,

Inc., used under license for technology invented andimplemented by Netscape.

MaxDB is a trademark of MySQL AB, Sweden.

SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP

NetWeaver, and other SAP products and servicesmentioned herein as well as their respective logos are

trademarks or registered trademarks of SAP AG in

Germany and in several other countries all over the world.

All other product and service names mentioned are thetrademarks of their respective companies. Data contained

in this document serves informational purposes only.

National product specifications may vary.

These materials are subject to change without notice.

These materials are provided by SAP AG and its affiliated

companies ("SAP Group") for informational purposes only,

without representation or warranty of any kind, and SAPGroup shall not be liable for errors or omissions with

respect to the materials. The only warranties for SAP

Group products and services are those that are set forth in

the express warranty statements accompanying suchproducts and services, if any. Nothing herein should be

construed as constituting an additional warranty.

These materials are provided “as is” without a warranty of

any kind, either express or implied, including but notlimited to, the implied warranties of merchantability,

fitness for a particular purpose, or non-infringement.

SAP shall not be liable for damages of any kind including

without limitation direct, special, indirect, or consequentialdamages that may result from the use of these materials.

SAP does not warrant the accuracy or completeness of the

information, text, graphics, links or other items contained

within these materials. SAP has no control over theinformation that you may access through the use of hot

links contained in these materials and does not endorse

your use of third party web pages nor provide any warranty

whatsoever relating to third party web pages.

SAP NetWeaver “How-to” Guides are intended to simplify

the product implementation. While specific product

features and procedures typically are explained in a

practical business context, it is not implied that thosefeatures and procedures are the only approach in solving a

specific business problem using SAP NetWeaver. Should

you wish to receive additional information, clarification or

support, please refer to SAP Consulting.

Any software coding and/or code lines / strings (“Code”)

included in this documentation are only examples and are

not intended to be used in a productive system

environment. The Code is only intended better explain andvisualize the syntax and phrasing rules of certain coding.

SAP does not warrant the correctness and completeness of

the Code given herein, and SAP shall not be liable for

errors or damages caused by the usage of the Code, exceptif such damages were caused by SAP intentionally or

grossly negligent.

Disclaimer

Some components of this product are based on Java™. Anycode change in these components may cause unpredictable

and severe malfunctions and is therefore expressively

prohibited, as is any decompilation of these components.

Any Java™ Source Code delivered with this product is onlyto be used by SAP’s Support Services and may not be

modified or altered in any way.

Page 3: How-To Use the SAP BusinessObjects Planning and Consolidation (BPC) Toolkit for LoadRunner

Document HistoryDocument Version Description

0.97.1 Internal release – Updated 07/08

Page 4: How-To Use the SAP BusinessObjects Planning and Consolidation (BPC) Toolkit for LoadRunner

Typographic ConventionsType Style Description

Example Text Words or characters quotedfrom the screen. Theseinclude field names, screentitles, pushbuttons labels,menu names, menu paths,and menu options.

Cross-references to otherdocumentation

Example text Emphasized words orphrases in body text, graphictitles, and table titles

Example text File and directory names andtheir paths, messages,names of variables andparameters, source text, andnames of installation,upgrade and database tools.

Example text User entry texts. These arewords or characters that youenter in the system exactly asthey appear in thedocumentation.

<Exampletext>

Variable user entry. Anglebrackets indicate that youreplace these words andcharacters with appropriateentries to make entries in thesystem.

EXAMPLE TEXT Keys on the keyboard, forexample, F2 or ENTER.

IconsIcon Description

Caution

Note or Important

Example

Recommendation or Tip

Page 5: How-To Use the SAP BusinessObjects Planning and Consolidation (BPC) Toolkit for LoadRunner

Table of Contents

1. Business Scenario ..........................................................................................................1

2. Background Information .................................................................................................1

3. Prerequisites....................................................................................................................1

4. How-To use the BPC Fiddler Converter Component .....................................................2

4.1 Using Fiddler to Capture SAP BusinessObjects Planning and ConsolidationProcesses .................................................................................................................2

4.2 Converting the Fiddler Trace file to a LoadRunner Script ...........................................4

4.3 Creating the LoadRunner Script ................................................................................94.4 What does the Fiddler Converter do? ...................................................................... 12

5. BPC User Checksum Generator Component ............................................................... 13

5.1 Creating User Checksums ...................................................................................... 13

5.1.1 Creating a Checksum for a single user ........................................................ 14

5.1.2 Creating Checksums for a User Range ....................................................... 15

5.2 Using the Checksums in a LoadRunner Script ......................................................... 16

6. BPC User Context Generator Component .................................................................... 19

6.1 Creating User Contexts ........................................................................................... 20

6.1.1 Creating Contexts for a Single User ............................................................ 20

6.1.2 Creating Contexts for a User Range............................................................ 21

6.2 Using the Contexts in a LoadRunner Script ............................................................. 22

Page 6: How-To Use the SAP BusinessObjects Planning and Consolidation (BPC) Toolkit for LoadRunner

1. Business ScenarioIn the course of promoting a new solution to production, many clients verify their landscapes using HPLoad Runner for stress testing, volume testing, and/or performance testing.

A companion How-To guide is available that describes the process of using LoadRunner with SAPBusinessObjects Planning and Consolidation in detail. This How-To guide documents a set of toolscreated within the EPM RIG that enable rapid script creation and assist with platform specificchallenges related to LoadRunner.

2. Background InformationThis How-To guide consists of the guide you are reading now, as well as a utility named the BPCLoadRunner Toolkit. (Download) This application converts currently contains three components:

1. The Fiddler Converter utility transforms Fiddler traces of SAP BusinessObjects Planning andConsolidation operations into LoadRunner scripts for the “Web Services”, “Web(HTTP/HTML)” and “SAP – Web” LoadRunner protocols.

2. The User Checksum Generator allows you to use multiple user accounts within LoadRunnerscripts by generating user specific checksums.

ImportantThe User Checksum Generator is specific to the Microsoft releases.

3. The User Context Generator allows you to use multiple user accounts within LoadRunnerscripts by generating user specific encrypted contexts. This also allows you to update theapplication set name with the encrypted context.

ImportantThe User Context Generator is specific to the SAP NetWeaver release.

3. Prerequisites HP LoadRunner licensed for one of the following protocols:

Web (HTTP/HTML)

SAP + Web

Web Services

Fiddler (for Fiddler Converter Component)

A third party tool available at http://www.fiddler2.com/fiddler2/

SAP BusinessObjects Planning and Consolidation, version for SAP NetWeaver

or

SAP BusinessObjects Planning and Consolidation, version for SAP Microsoft

Page 7: How-To Use the SAP BusinessObjects Planning and Consolidation (BPC) Toolkit for LoadRunner

4. How-To use the BPC Fiddler ConverterComponent

This section outlines the steps required to create LoadRunner scripts with the BPC Fiddler Converterutility.

4.1 Using Fiddler to Capture SAP BusinessObjectsPlanning and Consolidation Processes

The first step in this process is to capture the SAP BusinessObjects Planning and Consolidationprocess that will be converted into a LoadRunner script. This is done with the appropriate SAPBusinessObjects Planning and Consolidation client application and Fiddler.

For more information, refer to the How-To guide entitled “How-To Use the SAP BusinessObjectsPlanning and Consolidation, version for SAP NetWeaver Load Runner Utility”....

1. Close all applications that are generating HTTP traffic. This limits the amount of extraneoustraffic that is captured.

2. Launch fiddler.

3. Once fiddler has completed initializing, launch the SAP BusinessObjects Planning andConsolidation client you want to record.

4. Login to SAP BusinessObjects Planning and Consolidation and navigate to the report, inputschedule or other process you wish to execute.

At this point Fiddler will have captured a number of SOAP requests.

Page 8: How-To Use the SAP BusinessObjects Planning and Consolidation (BPC) Toolkit for LoadRunner

5. After you complete executing the process, stop capturing traffic in Fiddler by selecting “File ->Capture Traffic”.

6. The remaining sessions make up all of the HTTP calls that were made in the process yourecorded.

7. Save the Fiddler sessions in Fiddlers’ native format (ArchiveZip). This can be consulted in thefuture if you want additional details about the requests and responses included in yourrecording.

NoteThis is an optional step. It is a recommended practice as the resulting file can be loadedin Fiddler at a later time for additional review.

8. Save the remaining sessions as Text. This text file will be used by the utility to create theLoadRunner script. To do this:

Select All Sessions

TipIf you keep track of the request numbers (leftmost field in Fiddlers Web Sessions dialog)you can save subsets of the sessions individually. This gives you the benefit of morespecific LoadRunner transactions. For example, requests 1 through 5 may be for the“Login” transaction, while requests 6 through 11 may represent a data manager packagesubmission.

Select File -> Save -> Session(s) -> As Text…

Page 9: How-To Use the SAP BusinessObjects Planning and Consolidation (BPC) Toolkit for LoadRunner

4.2 Converting the Fiddler Trace file to aLoadRunner Script

The Fiddler Converter component of the BPC Toolkit for LoadRunner utility reads the details stored ina Fiddler Session file (text) and converts each request into the appropriate LoadRunner request. Theresulting output files’ text acts as the content of the LoadRunner Virtual User Generator Action section.

Page 10: How-To Use the SAP BusinessObjects Planning and Consolidation (BPC) Toolkit for LoadRunner

In addition, the utility adds the following:

A LoadRunner transaction encapsulating all LoadRunner Requests in the Fiddler text file

A LoadRunner sub transaction encapsulating each individual LoadRunner Request. The subtransaction name reflects the query type and request index.

C utility methods are added for convenience and for use in the verification code.

Each valid request captured by Fiddler will be converted to the LoadRunner request specificto the protocol you select. The conversion process performs the following tasks:

o Formats the request body appropriately for LoadRunner.

o Add Header values where appropriate

o Determines if requests are compatible with the selected LoadRunner protocol. If not,a comment is added to the output file.

Verification code is added to EvDRE Report and Input Schedule requests.

...

1. Launch the BPC LoadRunner Toolkit utility.

2. Enter a “Primary Transaction Name”. The “Primary Transaction Name” is used for the following:

As the name of the primary LoadRunner transaction encapsulating all of the actual requests.

As the name of the output file (a “.txt” extension is added) which contains the HP LoadRunnerVirtual User Generator Action section.

3. Select the appropriate “BPC Version”.

Page 11: How-To Use the SAP BusinessObjects Planning and Consolidation (BPC) Toolkit for LoadRunner

ImportantThe version selected here must match the version you used during the Fiddler recording.For example, this utility cannot convert requests from SAP BusinessObjects Planningand Consolidation 7.0 for Microsoft into SAP BusinessObjects Planning andConsolidation 7.0 for SAP NetWeaver.

4. Select the LoadRunner Protocol that you will use.

5. Select the Transport Protocol (either HTTP/HTTPS) in use.

Page 12: How-To Use the SAP BusinessObjects Planning and Consolidation (BPC) Toolkit for LoadRunner

TipSee the "I get certificate errors or .NET security exceptions when debugging withFiddler2." section in the following document for information on recording BPC over SSLwith Fiddler. (http://www.fiddlertool.com/Fiddler/help/knownissues.asp)

6. Enter the Fiddler text file created in section 4.1.

7. Enter the “Output Directory”. This is where the converted file will be stored.

Page 13: How-To Use the SAP BusinessObjects Planning and Consolidation (BPC) Toolkit for LoadRunner

8. The “Create Action Section” check box determines whether an entire Load Runner Actionsection gets created, or just the Web or SOAP requests.

9. Click the “Convert to LoadRunner” button.

10. A dialog box will be displayed when the conversion is complete. The message will review thenumber of requests converted and the location and name of the output file.

Page 14: How-To Use the SAP BusinessObjects Planning and Consolidation (BPC) Toolkit for LoadRunner

4.3 Creating the LoadRunner Script...

1. Open HP LoadRunner Virtual User Generator.

2. Create a new script with the LoadRunner protocol you specified in section 4.2.

NoteIf you are using either the “Web (HTTP/HTML)” or “SAP – Web” protocol, you shouldselect “Cancel” in the “Start Recording” dialog. The information we need is in the text filecreated in section 4.2.

Page 15: How-To Use the SAP BusinessObjects Planning and Consolidation (BPC) Toolkit for LoadRunner

3. Open the text file created in section 4.2 with your favorite text editor (notepad, etc). Select andcopy all of the text.

4. Overwrite the contents of the Action section of the LoadRunner script you created (step 2 of thissection) with the text in the clipboard.

Page 16: How-To Use the SAP BusinessObjects Planning and Consolidation (BPC) Toolkit for LoadRunner

5. Search for “web_set_user” in LoadRunner. Once found, update the default arguments.

“Domain\\Username” – Replace with the SAP BusinessObjects Planning and Consolidation users“Domain\\Username” you used in section 4.1.

“Password” – Replace with the users’ password.

NoteYou can encrypt the password using LoadRunner’s Password Encoder tool. If you usethis tool, you will have to replace the string “Password” with the function:

lr_decrypt(“Encoded_String”)

“ServernameAndPort” – Replace with the Server name and Port used during the recordingprocess. If unsure, you can obtain it from the URL property in any of the LoadRunner requests.

Page 17: How-To Use the SAP BusinessObjects Planning and Consolidation (BPC) Toolkit for LoadRunner

6. The script is ready to be tested and customized.

4.4 What does the Fiddler Converter do?This section lists the various functions performed by the utility included with this How-To Guide.

o Parses the following from the Fiddler text file for each SOAP request and response:

SOAP Request URL

SOAP Request body

HTTP Request Type (POST/GET/etc.)

SOAPAction Header

Content-Type Header

BPC Query Type (AxisQuery/CellQuery/etc.)

HTTP Response Code

o The SOAP responses are checked for the standard return and/or session statusmessages. If they are found, verification code will be added to the resulting LoadRunnerscript for this request.

o If the BPC Query Type is an EvDRE report or an Input Schedule then basic verificationcode will be added to the resulting LoadRunner script for this request.

o Formats the SOAP request so that it is compatible with a “C” style string. For example,backslash characters “\” are automatically escaped and newline characters are addedwhere necessary.

o Checks for standard “Return Status” and “Session Status” messages in responses. Addsverification if for appropriate return codes.

o Creates a LoadRunner script for the requested protocol, either Web Services or Web(HTTP/HTML).

o Wraps all SOAP/HTTP requests in a single LoadRunner transaction. The transactionname is based on the “Script Name” you specify in the utilities interface.

o Creates a LoadRunner sub-transaction for each SOAP/HTTP request, based on thespecified Script Name, the BPC query type (if identified) and the numeric ID of therequest.

o Ignores any unsuccessful (non HTTP-200 status) SOAP/HTTP requests when creatingthe LoadRunner script.

o Ignores any requests that are not valid for the Web Service protocol. It places a commentin the LoadRunner script identifying that a request was skipped.

Page 18: How-To Use the SAP BusinessObjects Planning and Consolidation (BPC) Toolkit for LoadRunner

o Ignores any requests that are not valid for the Web (HTTP/HTML) / SAP - Web protocols.It places a comment in the LoadRunner script identifying that a request was skipped.

o Splits the SOAP request body string into shorter string if it exceeds 10,000 characters.The lines are split at known delimiters (; and |) to ensure dimension member names arenot truncated.

o Content-Type and SOAPAction HTTP headers are added to the LoadRunner scripts whenappropriate.

o Adds code to correlate the ‘__VIEWSTATE’ parameter used in BPC Live Reporting.

o Adds code to correlate for Reporting Services

5. BPC User Checksum Generator ComponentThe BPC User Checksum Generator component is used to generate username checksums for BPC5.1 and BPC 7.0 for Microsoft. This is only required if you wish to execute the LoadRunner scriptswith a different BPC user (or users) than you used when recording the script. This allows you to useother user accounts by creating the BPC specific checksum values for a range of users. With this, it ispossible to parameterize both the username and checksum and avoid any authentication issues.

ImportantThis component is only applicable to the BPC 5.1 and 7.0 for Microsoft releases.

5.1 Creating User ChecksumsUser Checksums are created with the BPC Toolkit for LoadRunner. The component is located on theUser Checksum Generator tab.

Page 19: How-To Use the SAP BusinessObjects Planning and Consolidation (BPC) Toolkit for LoadRunner

5.1.1 Creating a Checksum for a single user1. After the BPC LoadRunner Toolkit has been launched, click on the “User Checksum Generator”

tab.

2. Ensure that the “Single User” radio button is checked.

3. Enter the username in the format

a. domain\username

ImportantThe Checksums that are generated are case specific. For example, the checksum forTest1 (6S82IPn/4eVRxAhWRRyMJWup/wg=) is different from the checksum of test1(1tTKttMgl+NS/74V602gUw5IKCA=). The case of the username in the SOAP messagemust match the case you used to generate the checksum.

4. Click the “Generate Checksums” button.

5. The resulting checksum will be displayed in the “BPC User Checksum” textbox on the right.

Page 20: How-To Use the SAP BusinessObjects Planning and Consolidation (BPC) Toolkit for LoadRunner

5.1.2 Creating Checksums for a User RangeIn many cases you will have a range of test user accounts including many users. The “User Range”option was created to facilitate this. To create checksums for a range of users:

1. After the BPC LoadRunner Toolkit has been launched, click on the “User Checksum Generator”tab.

2. Ensure that the “User Range” radio button is checked.

3. Enter the username prefix in the form:

a. domain\username_before_index

Example

4. Enter the Username Suffix if one exists.

NoteThis is optional. For example, if your usernames were:

td1\bpcUser_1_test

td1\bpcUser_2_test

Then the Username Prefix would be “td1\bpcUser_” and the Username Suffix would be“_test”

5. Enter the Start Index

Page 21: How-To Use the SAP BusinessObjects Planning and Consolidation (BPC) Toolkit for LoadRunner

6. Enter the End Index

7. Click the “Generate Checksums” button.

8. The resulting checksum will be displayed in the “BPC User Checksum” textbox on the right.

5.2 Using the Checksums in a LoadRunner ScriptAs mentioned in the section outline, some SOAP messages that BPC sends contain Usernameinformation and a related checksum value. To get LoadRunner scripts for BPC to work with multipleuser accounts you must parameterize all username and checksum values, and ensure that eachchecksum always refers to the username in use in the SOAP message.

This section will describe how to configure this.

1. Copy the content from the BPC User Checksums section to a new text file and save it in yourLoadRunner script directory with the extension “.dat” (the default extension for a parameter file).

Page 22: How-To Use the SAP BusinessObjects Planning and Consolidation (BPC) Toolkit for LoadRunner

NoteIn this example the parameter file is named “user_checksums.dat”

2. Replace all instances of the originally recorded username with a new parameter named“{Username}” or something similar. This can be found inside the “UserID” element of mostSOAP calls.

a. Text Before

b. Replace All

c. Text After

3. Replace all instances of the originally recorded checksum with a new parameter named“{Checksum}” or something similar. This can be found inside the “Checksum” element of mostSOAP calls.

a. Text Before

b. Replace All

c. Text After

4. Open LoadRunners Parameter List dialog (ctrl + L or Vuser -> Parameter List)

Page 23: How-To Use the SAP BusinessObjects Planning and Consolidation (BPC) Toolkit for LoadRunner

5. Create a new parameter named “Username” and configure it with the appropriate row selectioncriteria. Specify the “dat” file created in step 1 as the “File Path”.

NoteIf unsure use “Unique” or “Random” for “Select next row” and “Once” for “Update ValueOn”.

CAUTIONEnsure the parameter names match the case exactly of the parameters added to thescript in steps 2 and 3 as “C” is case sensitive.

6. Create a new parameter named “Checksum” and configure it with the appropriate row selectioncriteria. Specify the “dat” file created in step 1 as the “File Path”.

NoteThe critical configuration for “Checksum” is to set the “Select next row” option to “Sameas Username”.

Page 24: How-To Use the SAP BusinessObjects Planning and Consolidation (BPC) Toolkit for LoadRunner

6. BPC User Context Generator ComponentBPC 7.0 for SAP NetWeaver sends an encrypted copy of the context in the body of some SOAPmessages (EvDRE queries, for example). The context includes current view information as well asuser information. If an attempt is made to execute a LoadRunner script with a user other than therecording user, and the encrypted context has not been updated, then the .NET server will return anauthentication failure message.

This component allows you to create encrypted contexts for a range of users, based on the contextrecorded during the initial scripting phase.

ImportantThis component is only applicable for the BPC 7.0 for SAP NetWeaver release.

Page 25: How-To Use the SAP BusinessObjects Planning and Consolidation (BPC) Toolkit for LoadRunner

6.1 Creating User ContextsBPC user contexts are created with the User Context Generator component of the BPC Toolkit forLoadRunner.

6.1.1 Creating Contexts for a Single User1. After the BPC LoadRunner Toolkit has been launched, click on the “User Context Generator”

tab.

2. Select the “Single User” radio button and enter the username in the form “domain\username”.

3. (Optional) Enter an application set name if you wish to change that in the encrypted context aswell.

NoteThis option was added to facilitate migrating scripts to a different appset.

4. Copy the strContext element from one of the SOAP calls and paste it in the “Source strContext”text box.

TipThe “strContext” content can be located by searching for “<strContext><![CDATA[” inyour LoadRunner script. Once located, copy the text between “<strContext><![CDATA[”and “]]></strContext>”.

NoteThe context of strContext can be quite long.

Page 26: How-To Use the SAP BusinessObjects Planning and Consolidation (BPC) Toolkit for LoadRunner

5. Click the “Generate Contexts” button.

6. The resulting context will be displayed in the BPC User Contexts section.

6.1.2 Creating Contexts for a User Range1. After the BPC LoadRunner Toolkit has been launched, click on the “User Context Generator”

tab.

2. Select the “User Range” radio button”.

3. Enter the username prefix in the form:

a. domain\username_before_index

Example

4. Enter the Username Suffix if one exists.

NoteThis is optional. For example, if your usernames were:

td1\bpcUser_1_test

td1\bpcUser_2_test

Then the Username Prefix would be “td1\bpcUser_” and the Username Suffix would be“_test”

Page 27: How-To Use the SAP BusinessObjects Planning and Consolidation (BPC) Toolkit for LoadRunner

5. Enter the Start Index

6. Enter the End Index

7. (Optional) Enter an application set name if you wish to change that in the encrypted context aswell.

NoteThis option was added to facilitate migrating scripts to a different appset.

8. Copy the strContext element from one of the SOAP calls and paste it in the “Source strContext”text box.

TipThe “strContext” content can be located by searching for “<strContext><![CDATA[” inyour LoadRunner script. Once located, copy the text between “<strContext><![CDATA[”and “]]></strContext>”.

NoteThe context of strContext can be quite long.

9. Click the “Generate Contexts” button.

10. The resulting contexts will be displayed in the BPC User Contexts section.

6.2 Using the Contexts in a LoadRunner ScriptAs mentioned in the section outline, some SOAP messages that BPC sends contain Usernameinformation in a encrypted context. To get LoadRunner scripts for BPC to work with multiple user

Page 28: How-To Use the SAP BusinessObjects Planning and Consolidation (BPC) Toolkit for LoadRunner

accounts you must parameterize all username and encrypted context values, and ensure that eachencrypted context always refers to the username in use in the SOAP message.

This section will describe how to configure this.

1. Copy the content from the BPC User Contexts section to a new text file and save it in yourLoadRunner script directory with the extension “.dat” (the default extension for a parameter file).

NoteIn this example the parameter file is named “user_contexts.dat”

2. Replace all instances of the originally recorded username with a new parameter named“{Username}”, or something similar. This can be found inside the “UserID” element of mostSOAP calls.

a. Text Before

b. Replace All

c. Text After

3. Replace all instances of the originally recorded encrypted context with a parameter named“{Context}”, or something similar. This can be found within the CDATA section of the“strContext” element in many, but not all, SOAP calls.

a. Text Before (note – context data is much longer than what is displayed below)

b. Replace All

Page 29: How-To Use the SAP BusinessObjects Planning and Consolidation (BPC) Toolkit for LoadRunner

c. Text After

4. Open LoadRunners Parameter List dialog (ctrl + L or Vuser -> Parameter List)

5. Create a new parameter named “Username” and configure it with the appropriate row selectioncriteria. Specify the “dat” file created in step 1 as the “File Path”.

NoteIf unsure use “Unique” or “Random” for “Select next row” and “Once” for “Update ValueOn”.

Page 30: How-To Use the SAP BusinessObjects Planning and Consolidation (BPC) Toolkit for LoadRunner

CAUTIONEnsure the parameter names match the case exactly of the parameters added to thescript in steps 2 and 3 as “C” is case sensitive.

6. Create a new parameter named “Context” and configure it with the appropriate row selectioncriteria. Specify the “dat” file created in step 1 as the “File Path”.

NoteThe critical configuration for “Context” is to set the “Select next row” option to “Same asUsername”.

Page 31: How-To Use the SAP BusinessObjects Planning and Consolidation (BPC) Toolkit for LoadRunner

www.sdn.sap.com/irj/sdn/howtoguides