SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 10 of 10
  1. #1
    Advanced Member tarun kumar's Avatar
    Join Date
    Jan 2007
    Location
    Bangalore, India
    Posts
    647
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Parameterization for unique values

    Hi All,

    I was just wondering if there is any way to make sure that Vusers would use only unique values of parameterization. To make sure it I am using 'Random Variable' > 'String From Variable' > with Order 'Sequential'. But it doesn't work and all Vusers end up in using same value.

    Thanks in advance....

    Regards,
    Tarun K

  2. #2
    Senior Member
    Join Date
    Sep 2002
    Location
    ONDlodnol
    Posts
    111
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Parameterization for unique values

    Here try this

    dclrand
    rnPhone : RndStr("0123456789"; 16..16);
    Goodness is a part of life just like the Devil

  3. #3
    Advanced Member tarun kumar's Avatar
    Join Date
    Jan 2007
    Location
    Bangalore, India
    Posts
    647
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Parameterization for unique values

    Thanks Dear,
    But This kind of pattern wouldn't work here.
    The field which I am parameterizing is E-mail address.
    Application does basic authentication that entered E-mail address should follow basic pattern like - a@a.com
    Generation of random string can't force generation of these kind of values.
    Any other solution.

    Thanks in advance

    Regards,
    Tarun K

  4. #4
    Advanced Member
    Join Date
    Jan 2004
    Location
    UK
    Posts
    817
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Parameterization for unique values

    Well in effect the rand string would work, but you set a parameter constant, which would be the '@a.com'

    HTH
    I like what i know and I know what i like

  5. #5
    Advanced Member tarun kumar's Avatar
    Join Date
    Jan 2007
    Location
    Bangalore, India
    Posts
    647
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Parameterization for unique values

    maxj-

    Can you throw more light on this i.e. can you cite a syntatical example ?


    I have found one more solution -
    It doesn't work for me but might work for others who have same problem, hence I am illustrating it below:

    //----------------------------------------------------------------------
    // How to access unique lines in a single SilkPerformer .csv file for multiple agents
    //----------------------------------------------------------------------
    benchmark SilkPerformerRecorder
    use "WebAPI.bdh"

    dcluser
    user
    VUser
    transactions
    TInit : begin;
    TLoadtest01 : 1;
    TEnd : end;

    var
    hfile : number;
    sUserName : string;
    sPassword : string;

    dcltrans
    transaction TInit
    begin
    // Load CSV and set the delimiter to ","
    FileCSVLoadGlobal(hfile, "Login.csv", ",");

    // The GetUserID() function will retrieve a unique ID per virtual user
    // This ID is 1 for the first virtual user, 2 for the second and n for the n'th virtual user.
    // Move to the row in the file using the unique ID obtained
    // this means UserID 1 will use row 1, UserID 2 will use row 2 and so on...
    FileGetRow(hfile, GetUserId());

    // Set the username from the file at the specified row from the first column
    sUserName:=FileGetCol (hfile, 1, 10);
    // Set the password from the file at the specified row from the second column
    sPassword:=FileGetCol (hfile, 2, 10);
    end TInit;


    transaction TLoadtest01
    begin
    //write to username and password to the output file for checking
    writeln ("UserName: "+sUserName);
    writeln ("Password: "+sPassword);
    end TLoadtest01;


    transaction TEnd
    begin
    //Unload the CSV File
    FileUnload(hFile);
    End TEnd;
    =========================
    =========================

    For me it works only partially. When I raise count say 30 users then they again starting fetching same value from my CSV file.

  6. #6
    Advanced Member
    Join Date
    Jan 2004
    Location
    UK
    Posts
    817
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Parameterization for unique values

    Make your csv file bigger, then you will be able to get more than 30 vusers. Very good solution....... [img]/images/graemlins/smile.gif[/img]
    I like what i know and I know what i like

  7. #7
    Senior Member
    Join Date
    Sep 2002
    Location
    ONDlodnol
    Posts
    111
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Parameterization for unique values

    Yeah I just got done doing something like this. What he is saying is you load a file full of

    ex...

    a@a.com

    then it would work. it lot of manual work but you can get it done.
    Goodness is a part of life just like the Devil

  8. #8
    Advanced Member
    Join Date
    Jan 2004
    Location
    UK
    Posts
    817
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Parameterization for unique values

    Actually what i meant was something along the lines of the constant being'@a.com'. Then your file would be loaded with the username (FileGetCol (hfile, 1, 10))and the constant being concatented i.e. writeln ("UserName: "+sUserName+ constant);

    eg.
    var
    hfile : number;
    sUserName : string;
    sPassword : string;
    sPart : string;

    sPart:= "a.com"

    I'm sorry if this sounds bizarre or confusing but my grey cell is a bit scrambled.......

    [img]/images/graemlins/frown.gif[/img]

    HTH
    I like what i know and I know what i like

  9. #9
    Senior Member
    Join Date
    Sep 2002
    Location
    ONDlodnol
    Posts
    111
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Parameterization for unique values

    No it makes sense creating a file of username and loading them like here is a example that I wrote.

    <font class="small">Code:</font><hr /><pre>

    sSeparator := ",";
    sDelimiter := "/";
    sFileName := "C:\Program Files\Segue\SilkPerformer 7.3.1\Working\Data\login.csv";

    bFileE := FExists(sFileName);//test for the existince of a file name



    if bFileE = true then//while the file handle is zero the continue to evaluate
    print("File exists");
    if FIsOpen(sFileName) then//make sure that the file is open
    if sFileName = sFileName then //make sure that the file name matches
    end;
    end;
    end;




    if FileCSVLoadGlobal(hFile , sFileName, sSeparator, sDelimiter)= TRUE then //file handle &amp; file path
    //print("The Login file is loading");
    sMsg := PRT_TEXT(sMsg, OPT_DISPLAY_ALL, TEXT_GREEN);

    if hFile &gt; 0 then
    Print("Login File is loading");
    elseif hFile &lt;= 0 then
    write("Loading of the login file encountered a invalid row number");
    end;

    elseif FileCSVLoadGlobal(hFile , sFileName, sSeparator, sDelimiter) = FALSE then
    ERR_FILE_GETLAST(sErrorMsg ,sErrorNumber) ;
    end;



    </pre><hr />
    Goodness is a part of life just like the Devil

  10. #10
    Senior Member
    Join Date
    Sep 2002
    Location
    ONDlodnol
    Posts
    111
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Parameterization for unique values

    It does what you were talking about.
    Goodness is a part of life just like the Devil

 

 

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.71%
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 04:45 PM.

Copyright BetaSoft Inc.