SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 7 of 7
  1. #1
    Super Member
    Join Date
    Mar 2001
    Posts
    1,442
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Captuering Data and put into a file

    User (jeremie.w.dowdrick@convergys.com.nospam) posted:


    Hi all

    I want to captuer a dynamic text field off a web site and send it to an
    excel spreadsheet or text file when the test is running is this possable.
    If so what would be the best method of doing this.

    Jeremie

    --

    NOTICE: The information contained in this electronic mail transmission is
    intended by Convergys Corporation for the use of the named individual or
    entity to which it is directed and may contain information that is
    privileged or otherwise confidential. If you have received this electronic
    mail transmission in error, please delete it from your system without
    copying or forwarding it, and notify the sender of the error by reply email
    or by telephone (collect), so that the sender's address records can be
    corrected.


    Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/



  2. #2
    Super Member
    Join Date
    Mar 2001
    Posts
    1,442
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Captuering Data and put into a file

    User (JosephH614@aol.com.nospam) posted:

    Hmmm...I can get you started on this:

    1) Save the value into a parameter using one of the correlation functions (web_create_html_param, web_create_html_param_ex) and then use an output log

    2) Convert the parameter into a string with lr_save_str function

    3)Output the value to the output log text file using one of the log function (see LR function reference).

    .but not sure how to send it to a specific txt file/xls file. Check the Mercury Knowlegdebase -- there is probably a solution available.

    Good Luck,

    Joseph
    Patagon.Com


  3. #3
    Super Member
    Join Date
    Mar 2001
    Posts
    1,442
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Captuering Data and put into a file

    User Stephanie (ssylve1445@mindspring.com.nospam) posted:

    use the printf function to write it to the specified file. Help also has
    info on how to do it.

    Stephanie
    Initiatives
    ----- Original Message -----
    From: <JosephH614@aol.com>
    To: <LoadRunner@yahoogroups.com>
    Sent: Thursday, October 18, 2001 12:44 PM
    Subject: Re: [LoadRunner] Captuering Data and put into a file


    (web_create_html_param, web_create_html_param_ex) and then use an output log
    function (see LR function reference).
    Mercury Knowlegdebase -- there is probably a solution available.



  4. #4
    Senior Member
    Join Date
    Sep 2001
    Location
    Schenectady, NY, USA
    Posts
    138
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Captuering Data and put into a file

    To view the captured dynamic values in a file

    1. Put these two lines just above your action section (that is, above
    Action1(){... ):

    int fptr;
    char * fFile="C:\\DynamicValues.txt"; /* Change to your desired file location */

    2. After you have captured the dynamic value using web_create_html_param() or web_reg_save_param(), insert the following:


    if ((fptr = fopen( fFile, "a" )) != NULL) /* This will create the file if it does not exist, and write to the end of it if it does */
    {
    fprintf( fptr, lr_eval_string("{your_param}\n") ); /* Change to your parameter name, but keep the '\n' at the end! */
    fclose( fptr );
    }

  5. #5
    Senior Member
    Join Date
    Jun 2001
    Location
    London, United Kingdom
    Posts
    131
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Captuering Data and put into a file

    Be aware that doing this sort of action involves concurrency issues.

    If you have a lot of users or this is happening a lot then you are at risk of losing information and corrupting the file.

    Using the lr_output_message may be better as it should queue the requests to append the log and manage the concurrency.

    Russ.

    ------------------

  6. #6
    Junior Member
    Join Date
    Sep 2001
    Location
    Reston, Va, USA
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Captuering Data and put into a file

    You could use ADO to write directly to an excel file or you could write to a file in comma delimited format. There is a library we use, from performancemonitos.com, that will help with both these methods.

    mjt

    ------------------
    MJTaylor
    MJTaylor

  7. #7
    Junior Member
    Join Date
    Nov 2001
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Captuering Data and put into a file

    Can you enlarge upon the tools that exists in performancemonitors.com ?
    How you use it? And in what cases did it help you?

    ------------------

 

 

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 12:25 PM.

Copyright BetaSoft Inc.