Business Objects correlation

I have been working on some template LoadRunner scripts for Business Objects Web Intelligence / Crystal Reports which require good ole fashioned manual correlation.

Before writing this post, in the background I have been working on a tool comparison between LoadRunner and my increasing favourite JMeter with a simple (?) scripting exercise that goes through recording, replaying and correlating data for Business Objects. Common to both tools, is the requirement to correlate essential run time data. As my good Dutch friend Desiderius Erasmus once told us in 1466 …

In the land of the blind, the one-eyed man is king.
[In regione caecorum rex est luscus.]

Knowing how to correlate is key …

But how?

I’m not sure knowing how to correlate is something that can be taught. But I could be wrong. Inevitably I think it’s practice but a good (simple) tool can go a long way to helping your cause. And I’m not talking about LoadRunner either and it’s ability to automatically correlate data.

The tools I like and the reasons why are listed as follows:

1. Start off with something simple that can capture (record) a clean/working session. End to end. For this simple task I like to use Mozilla’s plugin for firefox called Live HTTP Headers
Live HTTP Headers.

2. Once you have your clean session, you can always refer back to it for later comparison. I also like to save multiple copies ofclean sessions in whatever load testing tool I’m using be it Load Runner or JMeter. However with something like Live HTTP Headers you are going to get all the detail including HTTP headers, content types, what’s being written to cookies, User-Agents and a multitude of other tid-bits that have affected automated attempts for me in the past…

3. Make use of tools already at your disposal. LoadRunner’s implementation of WDiff is handy but my favourite tool for file comparisons and a multitude of other handy features is GVim.

4. On the subject of vim, once you find the data that needs to be correlated, finding where it exists in the session is a lot easier, especially with search highlighting.
Search Highlighting with vim

5. When all else fails, or you are having difficulty playing spot the difference, you can’t go past diff tools. If you’re using GVim you’ll get a nice side by side comparison of the data you are trying to diff. I recommend that you RTFM on diff tools, as a proper understanding will save you alot of time. I remember being quite put off by diff when I first starting using it but can’t recommend it strongly enough now.

So that’s it for the tools. Back to the topic at hand, for those that just wanted to know how to correlate Business Objects, the key data that needs to be correlated regardless of your choice in load testing tools are:

1. Cookies – quite obviously. Add the Cookie Manager to your test plan (JMeter users) if you haven’t already done so. Goes without saying. LoadRunner will handle this for you by default.

2. The logon object has a query parameter called token that you’ll need to parametize:

// {param_token} = "NUS740PI:36400@1566JMtQROFQXUPQDwl41563J0P6vGHijC9eTob4ONEOFF"
web_reg_save_param("param_token",
"LB=token=",
"RB=&",
"Ord=1",
"Search=Body",
"RelFrameId=1",
LAST);

2. The main ‘body’ of your script will require sEntry or strEntry to be parametized. But that’s the tricky part and to be honest, something I wasted a few hours trying to puzzle out. sEntry is a changing dynamic value, so you need to parametize it at different points through your script. I know that’s a tautology in itself, but what I’m trying to say is that it has more than one value. You won’t get away with parametizing it at the first instance. The only way I spotted this was using diff and search highlighting in vim.

// {param_getPrompts_sEntry} created by tim.koopmans@90kts.com
// must precede web_url("viewCDZDocument.jsp" ...
web_reg_save_param("param_getPrompts_sEntry",
"LB=sEntry=",
"RB=&",
"Ord=1",
"RelFrameId=1",
"Search=Body",
"IgnoreRedirections=Yes",
LAST);

// Parameter {param_processPrompts_sEntry} created by tim.koopmans@90kts.com
// must preced web_url("getPrompts.jsp" ...
web_reg_save_param("param_processPrompts_sEntry",
"LB=strEntry=\"",
"RB=\"",
"Ord=1",
"RelFrameId=1",
"Search=Body",
"IgnoreRedirections=Yes",
LAST);

// Parameter {param_report_sEntry} created by tim.koopmans@90kts.com
// must precede web_submit_data("processPrompts.jsp" ...
web_reg_save_param("param_report_sEntry",
"LB=sEntry=",
"RB=&",
"Ord=1",
"RelFrameId=1",
"Search=Body",
"IgnoreRedirections=Yes",
LAST);

Hopefully that saves someone else some pain when correlating data for Business Objects.

9 comments to Business Objects correlation

  • Ted

    Make sure your vim highlight search is switched on, else you wont see it.
    :set hlsearch

  • Tim

    Another tip when using vim is to set a custom fold method based on a regular expression.

    For example, to fold all line entries that start with Cookie (we can safely assume that cookies are unique per session, so you may want to filter / fold any lines containing cookie information) in your original and modified script, run the following command:

    :set foldmethod=expr
    :set foldexpr=strlen(substitute(substitute(getline(v:lnum),'\\s','',\"g\"),'[^Cookie].*','',''))

  • Ted

    That’s almost a seperate blog post.

  • Chris

    Great tip, this will save me a lot of time. Any follow-ups to this?

  • Dmitry Motevich

    This visual tutorial describes with screenshots – how to correlate LoadRunner script:
    http://motevich.blogspot.com/2007/10/loadrunner-scripts-correlation-tutorial

    I hope, it is will be helpful for any LoadRunner user.

  • amit

    hi,
    currently i am receiving below error massage in server response ,can anybody know about this

    function okCB() {
    var topf=getTopViewerFrameset();
    if (topf!=null) topf.backToParent();
    }

    setTimeout(‘delayedDisplayDlg()’,100);
    function delayedDisplayDlg() {
    advDisplayViewerErrorMsgDlg(“Could not retrieve the document with the passed obsolete token. (Error: RWI 00323) (Error: INF )”,_ERR_REPORT, okCB);
    }

  • sudheer

    How to correlate when the LB itself is changing in a dynamic value?

  • kaostheory1

    Greetings all –

    I am searching for a solution to an issue that I have encountered doing some scripting for a BOXI R3 (Business Objects Enterprise 3.0) upgrade we are doing.

    I have recorded one script, which is for scheduling a Web Intelligence report instance and I have correlated all the dynamic values that seem relevant, auto-correlation engine is not finding anything outside of what I have discovered myself, all values appear to be grabbed properly by the web_reg_save_param but when I run my script, 3 out of 10, sometimes 4 out of 10 times it works, the rest fail with a “403 Forbidden – Trust Token Failed” error.

    Any ideas would be appreciated, I am at a loss for why it would work sometimes but not others….the value in question is designated as ‘bttoken’ in the submit or at least I think that is the culprit.

    Thanks in advance!

    See error below :

    I’d be happy to supply more information as needed….
    ———————————————————————
    Error 403: Trust Token failure. URI[/PlatformServices/jsp/Shared_InstanceTitle/instanceTit
    Action.c(1818): le.faces] Value [000D\\QgWbjcf[8TQ1fYZ2MX<0;E>_d90] Message[BOE
    Action.c(1818): Trust Token filter failed.message [Invalid Token]]\n

  • Great.. This worked for me. definitely appreciate the effort and time you put into this post

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">