SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Restart Thread

  1. #1
    Member
    Join Date
    Nov 2009
    Posts
    53
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Restart Thread

    Hi,

    I have Scenario where users Login , search & logout.
    Login credential are provide in CSV file.
    Issue is if any Http request fail thread continues with next request, but we require that if any request fail thread should restart with new credential.

    Regards
    Deepak

  2. #2
    Member
    Join Date
    Jul 2001
    Location
    Hamburg
    Posts
    464
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Restart Thread

    Thats pretty easy, go to thread group element and click on the second radiobutton "Stop thread"

    regards
    Udo

  3. #3
    Member
    Join Date
    Nov 2009
    Posts
    53
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Restart Thread


    Thanks for response.

    If we select radio button "Stop thread", then error thread get completely stop.

    For Example: we are using 400 V Users for 30 min, suppose 10 threads encounter error while login in first min of execution & we have selected "Stop thread" radio button then for next 29 min only 390 users or may be less users will be live.
    We require if any request fail, thread should restart with new credential i.e. start with login again to keep all 400 V users alive for entire execution.

    Regards
    Deepak

  4. #4
    Senior Member
    Join Date
    Apr 2009
    Posts
    331
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Restart Thread

    Two things you can try:

    1. have only valid logins in your CSV file (ask your DB guys to provide this)
    2. Add an IF controller stating that if login fails, try again.

  5. #5
    Member
    Join Date
    Nov 2009
    Posts
    53
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Restart Thread

    Thanks for response.

    Login failure was just an Example...

    Script has many sampler requests may be around 15 or more..

    we require if any sampler response contains error than thread should not proceed with preceding requests rather it should start again with first request.

    For scripts containing huge sampler requests, adding if controller across each request not seem to an good idea.


    Regards
    Deepak

  6. #6
    Senior Member
    Join Date
    Apr 2009
    Posts
    331
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Restart Thread

    Have you tried:

    Add Sampler > Test Action

    It allows you to Pause, Stop or Stop Now and can be applied to Current Thread.

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

    Re: Restart Thread

    Add Sampler > Test Action

    Test Action helps in either to Pause or Stop thread, both these are not matching our requirement...

    Requirement is On Error of any sampler response thread must not proceed with preceding request, rather thread must be active & start again with first request.

    Example

    Thread group
    Sampler 1
    Sampler 2
    Sampler 3
    Sampler 4
    Sampler 5
    .
    .
    .
    Sampler n

    if any of these samplers fail, suppose sampler 3 fail then thread must not proceed with sampler 4 rather thread should start again with sampler 1..

    Adding if controller against each sampler not seems to be an good idea.


    Regards
    Deepak

  8. #8
    Senior Member
    Join Date
    Apr 2009
    Posts
    331
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Restart Thread

    Hmm...

    This is tricky.

    I believe you could set it up in such a way that when a thread is terminated, a new one is created. I haven't done that before, and will need to play around with how to do it.

    Aside from putting an if after every request, I'm not sure how to do it. (Note: If you want to create only one IF statement, you could do a module controller after each request that points to a simple controller housing the IF statement.)

  9. #9
    Member
    Join Date
    Jan 2010
    Posts
    94
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Restart Thread

    This should fit your objective.

    Nest all samplers inside your If Controller and enable Eval. for all children.

    [ QUOTE ]

    Example

    Thread group
    -If Controller: enable "Evaluate for all children?"
    --Sampler 1
    --Sampler 2
    --Sampler 3
    --Sampler 4
    --Sampler 5
    .
    .
    .
    --Sampler n


    [/ QUOTE ]

  10. #10
    Senior Member
    Join Date
    Apr 2009
    Posts
    331
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Restart Thread

    Ah, I forgot about "Eval. for all children" - brilliant.

 

 
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 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 09:22 AM.

Copyright BetaSoft Inc.