SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Member LoadRunner421's Avatar
    Join Date
    May 2011
    Posts
    225
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    How do you put a null into a parameter list?

    I have a web http script, this is some of the code:

    Name=fld_patient_name", "Value={PatientName}"

    As you can see, {PatientName} is a parameter. It is a text file parameter actually.

    How do you put NULL as one of the options in the text file? If I put a blank line it doesn't detect the line. Empty quotes don't work, neither does putting a space.

    Any suggestions?

    Sometimes there is a patient name in the query but sometimes I want it to be blank like this:

    Name=fld_patient_name", "Value="

    Thanks

  2. #2
    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: How do you put a null into a parameter list?

    (The following represents how I would approach this - there may be an easier solution.)

    If you are trying to get this: Name=fld_patient_name", "Value="

    You can either control the use of blank by switching logic, or include a sentinel value that you process before passing.
    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!)

  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: How do you put a null into a parameter list?

    I have solved the problem. And discovered a bug...

    A blank line actually IS detected and used as a null when put into the parameter list. The problem is that loadRunner doesn't display the blank line in the GUI.

    Example:

    If my file has:
    Joe
    <blank line>
    John

    And then I save the file, it will display as:
    1. Joe
    2. John


    But if you open up the file again, the blank line is still there, and then if you simulate the parameter, it will indeed simulate the null value. And then of course I tested it for real and it works. ie. The second iteration uses a null value. (When sequential is used)

  4. #4
    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: How do you put a null into a parameter list?

    Makes sense and it works! [img]/images/graemlins/laugh.gif[/img]

    Usually this "feature" shows up because you have extra blank lines at the end of your file and you wonder why things are blowing up!!!!

    NICE JOB!
    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!)

  5. #5
    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: How do you put a null into a parameter list?

    Thanks. And thanks for your input as well.

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

    Re: How do you put a null into a parameter list?

    Intresting to know these small things. Thanks for sharing [img]/images/graemlins/smile.gif[/img]

  7. #7
    Member
    Join Date
    Jan 2011
    Posts
    99
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How do you put a null into a parameter list?

    [ QUOTE ]
    Makes sense and it works! [img]/images/graemlins/laugh.gif[/img]

    Usually this "feature" shows up because you have extra blank lines at the end of your file and you wonder why things are blowing up!!!!

    NICE JOB!

    [/ QUOTE ]

    Yep, those blank lines at the end of the .txt file are a sure 'gotcha'.

  8. #8
    Member
    Join Date
    Jul 2010
    Posts
    51
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How do you put a null into a parameter list?

    minimal thing, worth knowing...

  9. #9
    Junior Member
    Join Date
    Jun 2011
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How do you put a null into a parameter list?

    Hi,

    I tried as you said to send null value as a parameter but i am getting a error the when debugging the script as there is a blank line in the parameter file.

    so how to proceed further?

    i am using lr 9.1 version.


    sravan

  10. #10
    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: How do you put a null into a parameter list?

    Use a sentinel value.
    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!)

 

 
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 5.88%
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 12:16 PM.

Copyright BetaSoft Inc.