SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    Sep 2003
    Location
    Cleveland, Oh
    Posts
    110
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    [SOLVED] LR_Exit Function

    Hi All,

    I'm having an issue with the LR_Exit function, I am trying to basically stop when I reach this function and begin a new iteration. I am using LR 8.1 which referenced adding a line to the mdrv.dat file which I did. It doesn't matter which continuation option I choose it goes to vuser_end. Does anyone know of another way I can stop current iteration and begin new one?

    Thanks in Advance,
    Jacqui

    [ 03-02-2006, 07:39 AM: Message edited by: JakeBrake ]
    1. 9.10
    2. HTTP
    3. HTML-Advanced
    4. Concurrent Groups
    5. LR91P026 QFE
    6. New
    7. All protocols - 3500 Vusers
    8. Yes
    9. Windows 2003 SP2
    10. No

  2. #2
    Senior Member
    Join Date
    Jan 2002
    Posts
    678
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: [SOLVED] LR_Exit Function

    lr_exit( LR_EXIT_ITERATION_AND_CONTINUE, LR_FAIL );

    That's what I use.

  3. #3
    Member
    Join Date
    Sep 2003
    Location
    Cleveland, Oh
    Posts
    110
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: [SOLVED] LR_Exit Function

    That's what I did and it sends me to vuser_end instead of next iteration. I also tried it with MAIN and the same thing happened.
    1. 9.10
    2. HTTP
    3. HTML-Advanced
    4. Concurrent Groups
    5. LR91P026 QFE
    6. New
    7. All protocols - 3500 Vusers
    8. Yes
    9. Windows 2003 SP2
    10. No

  4. #4
    Moderator JakeBrake's Avatar
    Join Date
    Dec 2000
    Location
    St. Louis - Year 2025
    Posts
    15,609
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: [SOLVED] LR_Exit Function

    lr_exit is doing exactly what it is supposed to do.

    Just use a return at the appropriate place.

  5. #5
    Moderator
    Join Date
    Aug 2001
    Location
    NC
    Posts
    6,028
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: [SOLVED] LR_Exit Function

    Try a variation on your them. The use of the return() function with various return codes (0,1,-1) might also allow you to achieve the same results.
    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

  6. #6
    SQA Knight
    Join Date
    Jan 2002
    Location
    Highlands Ranch, CO, USA
    Posts
    2,860
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: [SOLVED] LR_Exit Function

    Jacqui,

    In which action are you putting the lr_exit call? If it is in the vuser_init then I can see why it keeps jumping out to the vuser_end. That function with the described option wouldn't work there.

    You would need a seperate action from the vuser_xxx ones to do the iterations on, thus:

    vuser_init
    action1
    action...
    vuser_end

    I have used the lr_exit function successfully here is a code snippet that might help, it is inside of the main action(s) that I use in LR:

    if (atoi(lr_eval_string("{CntrctFndErr}")) > 0)
    {
    web_url("Select a Different Policy",
    "URL=https://stage.ebenefits.com/wps/myportal/select",
    "TargetFrame=",
    "Resource=0",
    "RecContentType=text/html",
    "Referer=https://stage.ebenefits.com/wps/myportal/strutsAction=%212fcontracts%212fbasicView.fb%213fm ode%3DshowContracts%2126{ViewContractLinkID}",
    "Snapshot=t17.inf",
    "Mode=HTML",
    LAST);

    lr_vuser_status_message("Contract : %s is Bad, Aborting and going to next iteration", lr_eval_string("{pContractID}"));
    lr_message("Contract : %s is Bad, Aborting and going to next iteration", lr_eval_string("{pContractID}"));

    lr_exit(LR_EXIT_ITERATION_AND_CONTINUE, LR_AUTO);

    }


    This does exactly what it should upon finding an error in my process, it does its work to get back to a previous point and writes it messages and then exits the action and starts on the next iteration.

    I pretty much use vuser_init to start my application/web browser and then after that I write seperate actions/functions to do my work and the interations if needed. It is rare that I put any other script code into the vuser_init (only if I need single signon for a test).

    That is my take on this, hope it helped.

    Jim
    Jim
    -------------------------------------------
    For all the general stuff to know about QA/Test go here http://www.softwareqatest.com/

  7. #7
    Member
    Join Date
    Sep 2003
    Location
    Cleveland, Oh
    Posts
    110
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: [SOLVED] LR_Exit Function

    Thanks Jake,

    I had a braindead moment on this project and freaked out. I have it working now.
    1. 9.10
    2. HTTP
    3. HTML-Advanced
    4. Concurrent Groups
    5. LR91P026 QFE
    6. New
    7. All protocols - 3500 Vusers
    8. Yes
    9. Windows 2003 SP2
    10. No

  8. #8
    Moderator JakeBrake's Avatar
    Join Date
    Dec 2000
    Location
    St. Louis - Year 2025
    Posts
    15,609
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: [SOLVED] LR_Exit Function

    Great ya got-r-dun. Please also consider variations supplied by James Pulley and jimhazen.

    Thanks for notifying this forum that you arrived!

 

 

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 © 2017 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 © 2017 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 08:21 PM.

Copyright BetaSoft Inc.