SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Member
    Join Date
    Jan 2004
    Location
    Germany
    Posts
    110
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    web_reg_save_param_ex - how can i succeed

    Hello

    This is some relevant part the response data returned from the server (taken from the replay log):

    Action.c(276): 0`crf`298`dft`6`t`299`dn`439`9`0`f`0`itx`1`n`421`s c`0`l`100`ibp`1`crf`298`dft`6`t`299`dn`4
    Action.c(276): 22`11`0`f`0`itx`1`n`423`sc`0`irq`1`l`50`ibp`1`crf` 298`dft`6`iro`1`t`299`dn`343`8`0`f`0`itx
    Action.c(276): `1`n`424`sc`0`l`50`crf`298`dft`6`t`299`dn`425`8`0` f`0`itx`1`n`426`sc`0`l`100`crf`298`dft`6
    Action.c(276): `t`299`dn`427`11`0`f`0`itx`1`n`308`sc`0`irq`1`l`15 `crf`298`dft`6`ihn`1`iro`1`t`301`dn`440`
    Action.c(276): 4`4`rl`0`inrk`1`crnm`1`nmr`3`atr`0`2`0`r`0`v`1*N4* Herr0*7*Baumann4*Karl11*Entscheider15*PT
    Action.c(276): (Putzt\xFCcher)24*Leiter Metallbearbeitung22*Kaufm\xE4nnischer Einkauf7*1-CDMF4`i`1-CDMF4
    Action.c(276): `2`0`r`0`v`1*N4*Frau0*7*Konnert6*Carola14*Sachbear beiter17*MHL (Handelsware)0*0*8*1-908T5N
    Action.c(276): -> `i`1-908T5N`2`0`r`0`v`1*N0*0*9*Unbekannt1*-0*0*0*0*7*1-CDMEZ`i`1-CDMEZ`1`0`tr`0`v``1`2`vi`
    Action.c(276): 3``ich`1`0`1`nla`0`19`4`ai`3`S_A3`nfi`1`n`Contact Pick Applet`cud`2*161*12*141*13*2571*12*
    Action.c(276): 121*12*201*13*2651*13*2661*13*2061*13*4071*13*4011 *13*4041*13*4001*13*4101*13*3901*13*3951
    Action.c(276): *13*3971*13*3981*13*3941*13*2671*13*2691*12*101*11 *31*13*3851*13*3891*13*3871*13*4281*13*2
    Action.c(276): 451*13*4171*03*4261*03*4211*03*4241*03*4231*03*413 1*03*4291*03*4301*03*4191*03*4201*03*415

    I want to capture the String "Unbekannt" (line marked with "->"). When i use the following web_reg_save_param_ex
    command, i succeed.

    web_reg_save_param_ex("paramName=NameAnsprechpartn er",
    "LB=`v`1*N0*0*9*",
    "RB=1*",
    "Ordinal=1",
    LAST);

    The parameter "NameAnsprechpartner" contains the value "Unbekannt".

    When i try to use this commant with a regular expression as the left boundary, i fail.

    web_reg_save_param_ex("paramName=NameAnsprechpartn er",
    "LB/RE=`v`1\*N0\*0\*9\*",
    "RB=1*",
    "Ordinal=1",
    LAST);

    The following error message is given in the replay log:

    Action.c(276): Error -35061: No match found for the requested parameter "NameAnsprechpartner". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 2048 bytes, use web_set_max_html_param_len to increase the parameter size [MsgId: MERR-35061]
    Action.c(276): web_custom_request("start.swe_21") highest severity level was "ERROR", 2810 body bytes, 238 header bytes, 12 chunking overhead bytes [MsgId: MMSG-26387]

    and i have given the command
    web_set_max_html_param_len("2048");
    to increase the parameter size.


    The only change in the second command is to hide the meta character "*" with the escape character "\". I know in this
    example it does not make sense to use a regular expression but this is only the first step. The result will be
    to have a regular expression but for now i fail in this simple example.
    I verified the expression using "rubular.com" and here i see what i expect.

    Thanks and regards
    Thomas
    xtom

  2. #2
    Member
    Join Date
    Apr 2008
    Location
    India
    Posts
    244
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: web_reg_save_param_ex - how can i succeed

    Hi Thomas,

    When first method works, adopt the same in test script.

    Please make a note sophisticated use of regular expressions make a Vuser script harder to understand,debug and adversely affects performance.

    Avoid careless and unnecessary use of REs. For example, use of REs like ".+" and ".*" can have unexpected results.It will not properly extract correct values.

    Regards,
    Mahesh.S

  3. #3
    Member
    Join Date
    Jan 2004
    Location
    Germany
    Posts
    110
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: web_reg_save_param_ex - how can i succeed

    hello Mahesh!

    The first method is not sufficient. Part of the left boundary may change. This is SIEBEL and depending on the screen content the last "*9*" may be "*5*" it the string is "Buddy" instead of "Unbekannt" (5 instad of 9 characters).
    But if do not succeed with this simple example i do not need to squeeze my brain for a more compelx regular expression ...

    Thanks
    Thomas
    xtom

  4. #4
    Moderator
    Join Date
    Feb 2010
    Location
    Europe
    Posts
    944
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: web_reg_save_param_ex - how can i succeed

    Tom

    I've worked extensively with Siebel in regular web protocol

    my advice is to abandon the idea of correlating individual elements of star arrays and to grab the whole array and chop it up in code (sounds like a pain and it is, but once it's done, it's done - stick it in a function)

    this will allow you to implement randomness in your script much more successfully

    Jim

  5. #5
    Member
    Join Date
    Jan 2004
    Location
    Germany
    Posts
    110
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: web_reg_save_param_ex - how can i succeed

    Hello Jim!

    Thanks for your response (i knew why i added the word SIEBEL in my post ...).

    I would like to avoid doing this manually - but this is the fallback solution of course.
    But why is LoadRunner not doing what i want it to do? In a different environment regular expressions may be very helpful.

    Thanks
    Thomas
    xtom

  6. #6
    Senior Member
    Join Date
    Jun 2011
    Location
    London, England
    Posts
    243
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: web_reg_save_param_ex - how can i succeed

    I'm not at a machine with LR on so I can't check but I don't think you can use regexps with web_reg_save_param_ex. Try using web_reg_save_param_regexp instead (only in LR11+).

    Note. A standard regexp to grab this would be

    `v`1\*N0\*0\*9\*([^1]*)

    The parenthesis define the match (not LB or RB). But you'll probably need to extend the regexp to make it more reliable. More like this:

    `[a-z]`[0-9]\*[A-Z][0-9]\*[0-9]\*[0-9]\*([^1\*]*)

    I wrote about this subject here.

  7. #7
    Member
    Join Date
    Jan 2004
    Location
    Germany
    Posts
    110
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: web_reg_save_param_ex - how can i succeed

    Hello Oliver!

    Thanks for your reply. You tell me what i did not want to believe but what may be the reality: LR11 does not support regular expressions in "web_reg_save_param_ex" although the help has some documentation about it.
    LR11 does not know the command "web_reg_save_param_regexp". I tried that based on your documentation which i consulted before but i thought this unknown name was a typo in your text.

    I think i need to install patch 3 to get the command available. But be sure then i will check your pattern and if it succeeds my task is nearly finished ... (additional remark: the digit 9 inicates the length of the following field and this may be more than 9. So in this case i need to add a + sign to pattern and also to some others too).

    In the meantime i will create a little function like Jim suggested.

    Thanks
    Thomas
    xtom

  8. #8
    SQA Knight
    Join Date
    Jul 1999
    Location
    Grand Rapids, MI
    Posts
    3,727
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: web_reg_save_param_ex - how can i succeed

    I just checked and vuGen 11 help surely does support web_reg_save_param_regexp. And web_reg_save_param_ex confusingly states:

    [ QUOTE ]

    In release 11.00, the /RE qualifier was supported. This support is discontinued because fuller regular expression functionality is now provided by web_reg_save_param_regexp.


    [/ QUOTE ]

    That is terribly worded (but what's new with LR documentation?), because if you are using version 11.03 (which you should be) is /RE supported or not? I think the answer is it is not.

    At any rate use web_reg_save_param_regexp when it is available.

  9. #9
    Moderator
    Join Date
    Feb 2010
    Location
    Europe
    Posts
    944
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: web_reg_save_param_ex - how can i succeed

    having had a fair it of experience performance testing siebel with LR, I'd strongly advise you to go the route of grabbing the whole star array and chopping it up...

    this is a known working solution... & how siebel-web protocol works

    use of regexs to get at individual elements of star arrays, is not proven and may end up with issues when different users don't return exactly the same shape data set

    but you could always try it and tell us!!!

  10. #10
    Member
    Join Date
    Jan 2004
    Location
    Germany
    Posts
    110
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: web_reg_save_param_ex - how can i succeed

    Hello!

    At the moment the situation is the following: On my VUGen the command "web_reg_save_param_regex" was not available. Reason: The patch applied did not succeed to install correcly. After this was done, the command and the help text were available. So - now i will NOT use the command "web_reg_save_param_ex" to solve my problem because it does not work!

    @thorwath
    Your hint gave me the right path to have a look to the point where the problem exist - the wrong command and the missing patch.

    @Jim
    I have created a function to extract the desired element from the StarArray so that i can use it in the script. But nothing at all i will also check the function "web_reg_save_param_regex" more intensive. May be i will see it works or i will forget it. But at the end i know the capabilities of this command and it may be useful for a different task.

    Thanks
    Thomas
    xtom

 

 
Page 1 of 2 12 LastLast

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 10.00%
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 06:05 AM.

Copyright BetaSoft Inc.