SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 10 of 10
  1. #1
    Junior Member
    Join Date
    Feb 2004
    Location
    banlore
    Posts
    27
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    correlation in loadrunner

    hi ;
    Iam facing problems when trying correlation in loadrunner.
    i need to test an https site.

    where ijust login .tihs contain certain memos whose number may very.
    i need to select all do (for example delete).
    the data that will be posted contain dynamic value for each memos.

    i used manual correlation by typing the following command.
    web_reg_save_param( "WCSParam_Diff1", "LB=<input type=\"checkbox\" name=\"envelopes\"value=\"", "RB=\"", "Ord=All", "Search=body", "RelFrameId=1", LAST );


    where the html source for one memo is like
    <input type="checkbox" name="envelopes" value="418300|150|2527" />

    dynamic value =418300|150|2527
    where the occurance of that memo can be 10,20,any no
    but
    for WCSParam_Diff1_count its giving 0

    how can i tackle this problem
    sugessions please
    thanks in advance

  2. #2
    Moderator
    Join Date
    Aug 2001
    Location
    NC
    Posts
    6,018
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: correlation in loadrunner

    a. This looks like an auto-generated statement, not one that you would type. The variable name "WCSParam_Diff1" is a dead givaway.

    b. Do you really need an ORD of all, or will only the first instance of this be sufficient. Are there other instances of this variable, "envelopes" represented in the return stream. My read on this is that you only need the first instance of the returned stream.

    c. Some aspects of your left boundary and right boundary could be shortened as too generic, such as removing the "checkbox" components.

    Given your source, try the following

    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">web_reg_save_param(&quot;Envelope_Valu es&quot;,&quot;LB=\&quot;envelopes\&quot; value=\&quot;&quot;,&quot;RB=\&quot;&quot;,&quot;O RD=1&quot;,...);</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">Then use strtok() to break apart your multipart stream demarked with "|"

    Placement is critical. Remember that web_reg_save_param() is a sieve that the return stream passes through during which the values bounded by LB and RB are left in the sieve after the call. Many times when no values are returned the placement of the correlation statement may be in the wrong spot.
    James Pulley

    Replace ineffective offshore contracts, LoadRunnerByTheHour. Starting @ $19.95/hr USD.

    Put us to the test, skilled expertise is less expensive than you might imagine.

    Twitter: @LoadRunnerBTH @PerfBytes

  3. #3
    Junior Member
    Join Date
    Feb 2004
    Location
    banlore
    Posts
    27
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: correlation in loadrunner

    thanks Mr James Pulley for reply
    the problem was misplaced correlation statement.
    Now its working properly.
    wrt to your question i need multiple instance of dynamic data .
    below corresponds to only one memo i need to track all memo of that page so i need ord =all
    &lt;input type="checkbox" name="envelopes" value="418300|150|2527" /&gt;

    iam doing all these things to genaralise web_submit_data whose un correlated format as follows.

    web_submit_data("portalservice",
    "constant part of submit data"
    //variable part depends on the no: of memos
    ITEMDATA,
    "Name=envelopes", "Value=401055|1|2145", ENDITEM,
    "Name=envelopes", "Value=401032|1|2146", ENDITEM,
    "Name=envelopes", "Value=401034|1|2147", ENDITEM,
    "Name=envelopes", "Value=401036|1|2148", ENDITEM,
    "Name=SubmitRequest", "Value=2", ENDITEM,
    "Name=execute", "Value=Submit", ENDITEM,
    "Name=serveCountHidden", "Value=1", ENDITEM,
    LAST);

    is for 4 memos i need to genaralise it what i intend is store it as an array of struct and pass
    reference ,but ENDITEM creates problem since its
    i don't(i did nt find it in function reference)know its data type ,anybody please sugest a solution


    struct {
    char *name ;//"Name=envelopes",
    char *value;//"Value=401055|1|2145"
    end ; ?data type of ENDITEM
    };

    thanks in advance

  4. #4
    Junior Member
    Join Date
    Feb 2004
    Location
    banlore
    Posts
    27
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: correlation in loadrunner

    ENDITEM IS A STRING ITSELF "ENDITEM"
    #define ENDITEM "ENDITEM"
    OPEN THE CORRESPONDING HEADER AND SEE IT

  5. #5
    Junior Member
    Join Date
    Feb 2004
    Location
    banlore
    Posts
    27
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: correlation in loadrunner

    what now i tried is

    struct submitdata
    {
    char name[30];
    char value[30];
    char enditem[30];
    };

    when in

    struct submitdata *instance =(struct submitdata *) malloc(sizeof(struct submitdata));
    instance ="Name=envelopes","Value={WCSParam_Diff_1}",193366 25};
    strcpy(instance-&gt;name,"Name=envelopes") ;
    strcpy(instance-&gt;value ,"Value={Envelopes_name_1}");
    strcpy(instance-&gt;enditem,"ENDITEM") ;
    its not working and gives the following error:


    ction1.c(39): Error: The "Name" argument (number 10) is specified more than once
    Action1.c(39): web_submit_data highest severity level was "ERROR", 0 body bytes, 0 header bytes

    please help ?


    web_submit_data("portalservice",
    "constant part of submit data"
    //variable part depends on the no: of memos
    ITEMDATA,instance
    ,
    "Name=SubmitRequest", "Value=2", ENDITEM,
    "Name=execute", "Value=Submit", ENDITEM,
    "Name=serveCountHidden", "Value=1", ENDITEM,
    LAST);

  6. #6
    Moderator
    Join Date
    Aug 2001
    Location
    NC
    Posts
    6,018
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: correlation in loadrunner

    Actually if I read you correctly, what you have run into is a variable nunber of parameters which might be returned and then need to be repassed back to the host in a return stream. You are unlikely to be able to accomplish what you need to do with a web_submit_data() for thr iterms you have already run into regarding the formatting of lines.

    Instead, convert the return stream to a web_custom_request(). You can pull the actual return stream from the recording log for building your function. The big advantage of the web_custom_request() is that all of the information passed back will be in string form. You can then substitute the variable length portion of the return stream with a loadrunner variable, and then use a function to build the contents of the variable, maybe something like this.

    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">char holdthis[256],envelope_index_name;
    int number_of_envelopes,envelope_limit;
    ...
    envelope_limit=atoi(lr_eval_string(&quot;Envelope_ Values_count&quot);
    for ( number_of_envelopes=1;
    number_of_envelopes&lt;=envelope_limit;
    number_of_envelopes++)
    {
    sprintf( envelope_index_name,
    &quot;{Envelope_Values_%d}&quot;,
    number_of_envelopes&quot;
    sprintf( holdthis,
    &quot;%s&amp;Envelope&amp;%s&quot;,
    holdthis,
    lr_eval_string(envelope_index_name));
    }

    lr_save_string( holdthis,
    &quot;envelope_information_to_include_in_your_web_ custom_request_call&quot;</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">Some of your label and structure might differ, but the web_custom_request() is definitely the way to go for a variable number of returned items rather than trying to dynamically construct a web_submit_data().
    James Pulley

    Replace ineffective offshore contracts, LoadRunnerByTheHour. Starting @ $19.95/hr USD.

    Put us to the test, skilled expertise is less expensive than you might imagine.

    Twitter: @LoadRunnerBTH @PerfBytes

  7. #7
    Junior Member
    Join Date
    Feb 2004
    Location
    banlore
    Posts
    27
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: correlation in loadrunner

    thanks Mr James Pulley ,
    you show me a new path.
    could i give the data web_custom_data in the same format as of web_submit_data or need to give actual posting data seen in extended log .there
    i find it difficult since its https everything seems in an encrypted form
    please help

  8. #8
    Moderator
    Join Date
    Aug 2001
    Location
    NC
    Posts
    6,018
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: correlation in loadrunner

    web_custom_request is in a different form. You will find the appropriate examples in the help file and the actual contents of your submission in the recording log.
    James Pulley

    Replace ineffective offshore contracts, LoadRunnerByTheHour. Starting @ $19.95/hr USD.

    Put us to the test, skilled expertise is less expensive than you might imagine.

    Twitter: @LoadRunnerBTH @PerfBytes

  9. #9
    Junior Member
    Join Date
    Feb 2004
    Location
    banlore
    Posts
    27
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: correlation in loadrunner

    thanks a lot Mr james pulley .
    i got the custom submit data when i tried recording the same with url mode with only web_custom_request.
    thanks again

  10. #10
    Junior Member
    Join Date
    Feb 2004
    Location
    banlore
    Posts
    27
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: correlation in loadrunner

    thanks a lot Mr james pulley .
    i got the custom submit data when i tried recording the same with url mode with only web_custom_request enabled as its option.
    thanks again .
    now submit data is generalised

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 01:11 PM.

Copyright BetaSoft Inc.