SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 9 of 9
  1. #1
    Junior Member
    Join Date
    Feb 2010
    Posts
    16
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Multiple fields contains same boundaries. how to r

    VUGen 11
    Http/Html protocol
    MS XP


    There are 4 list boxes in the application with same boundaries. I need to select random values from each drop down.
    First way I did correlation for the first list box. Then I used lr_paramarr_random function to get the values from that. But as the boundaries are same for all drop down lists, its giving all values in first list box correlation parameter.

    Other way I did was capture the first value in the drop down and set the boundaries for that. In this way I am able to get all values in correlation parameter. But next I am not able to select the values randomly. What function we need to use for this? lr_paramarr_random is failing in this case.

    Note: For every user these list box values are different

    any ones help is appreciated.

  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: Multiple fields contains same boundaries. how to r

    Time to bring your C string manipulation capabilities to play. Capture from the start of the list to the end, then use your own algorithms to break out the individual list items for select and/or correlation.

    This is why a solid working knowledge of the language of your test tool is a foundation item for use of the tool. The same holds true whether you are using LoadRunner, SilkPerformer, JMETER, or Bob's superfantastic homegrown crushing load tool, you need to know the language of your tool.
    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
    Member LoadRunner421's Avatar
    Join Date
    May 2011
    Posts
    225
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Multiple fields contains same boundaries. how to r

    You can probably use a regular expression to capture what you want.

    You can either use web_reg_save_param_regexp() or
    web_reg_save_param_ex(). And of course you have to learn a bit of regular expression syntax.

    If you paste some of the code you're trying to capture that would help to see what needs to be done.

  4. #4
    Member
    Join Date
    Mar 2008
    Posts
    115
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Multiple fields contains same boundaries. how to r

    Sreenivas

    There are two ways I can suggest:
    1) Do the correlation with Ordinal set to All. This way you will be able to get all values with same boundaries in an array. Then traverse this array using lr_paramarr_random function. It can be used with all four list boxes.

    2) If you are aware of the values of List boxes,put them in a parameter file, using parameter file and c coding fetch values in a random way. If desired, you can deliberately alter sequence of values in parameter file and then use sequential or unique if it works for your case.

    Most importantly, learn more into correlations.
    Regards
    VC

    Happy Learning!

  5. #5
    Junior Member
    Join Date
    Feb 2010
    Posts
    16
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Multiple fields contains same boundaries. how to r

    Thanks to all.

    Vinay,

    I already tried the ways you suggested. 1st one: I am getting all values in the first drop down itself and in random selection its getting failed when it selects the other dropdown value in the first step.
    2nd solution: As for every user combinations of values are changing (new values for some users) we can not do parameterization..

    1st try (these boundaries are there for all drop downs).
    Correlation:
    web_reg_save_param("StrLocation",
    "LB=option value=\"",
    "RB=\">",
    "Ord=All",
    LAST);
    Random: StrLocationrandom=lr_paramarr_random("StrLocationN ew" );


    2nd one I did it with boundaries of first value in the response(in this I am able to get all values for location. but after that random function is not working. I think some other function needs to be used)

    web_reg_save_param_ex(
    "ParamName=InvoiceLocation",
    "LB/IC=id=\"ddlLocation\" class=\"standardDropDown\">\r\n\t<option value=\"\">",
    "RB/IC=</select>",
    SEARCH_FILTERS,
    "Scope=All",
    "RequestUrl=*/Invoicing.aspx*",
    LAST);

  6. #6
    Moderator
    Join Date
    Jan 2006
    Location
    Charlotte, NC
    Posts
    1,600
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Multiple fields contains same boundaries. how to r

    When I faced this problem I solved it with fairly complex C code.
    Unless you are writing a compiler, strtok is NOT the answer.
    See: http://www.sqaforums.com/showflat.ph...=541641#542222

    QAF is still an exercise in self-sufficiency! (Thank JB!)

  7. #7
    Member LoadRunner421's Avatar
    Join Date
    May 2011
    Posts
    225
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Multiple fields contains same boundaries. how to r

    [ QUOTE ]
    For every user these list box values are different

    [/ QUOTE ]

    [ QUOTE ]
    As for every user combinations of values are changing (new values for some users) we can not do parameterization..


    [/ QUOTE ]


    You could do this with paramaterization. Just find out how the application is serving up the data, and then mimic that with some parameter files.

    You say that the data changes for every user, but that doesn't matter:

    1. If the data varies based on user roles, then evaluate the "role" that the vuser is running, and then paramaterize based on the role.

    2. If the data is truly and completely random for every single user regardless of who they are, then get someone to query all the possible values from the DB, send them to you, and then you paramaterize the values into the script making sure to also implement the same complete randomness.

    And if the values aren't in a database, and are generated dynamically somehow, then just figure out what method is used to generate the random value and generate the value yourself. The application doesn't care WHERE or HOW the value came to be, it only cares that it is a valid value.



    Or am I missing something about this??

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

    Re: Multiple fields contains same boundaries. how to r

    Use web reg save param to get the contents of each combo box as a single param then chop each of those up into the individual elements and randomly select one of each and insert into the request

    It's not very difficult but will require a bit of c coding

  9. #9
    Member
    Join Date
    Mar 2008
    Posts
    115
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Multiple fields contains same boundaries. how to r

    Srinivas

    You need to use 'Ordinal=All' in web_reg_save_param_ex() in your second case.
    Second function code does not contain the same and hence the parameter array is not returned. Without Ordinal=All, only a single parameter is returned and therefore you are unable to use lr_paramarr_random()
    Regards
    VC

    Happy Learning!

 

 

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 8.82%
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:34 AM.

Copyright BetaSoft Inc.