ChanGan
ChanGan

Reputation: 4318

How to stop current thread if it fails and get new thread in Jmeter?

Threads: 1000 

1. Validate username
2. Validate Password
If controller
    3. User Info
    4. Settings
    5. Payments
    etc...
    20. Logout

Now if Validate Password is failed then the subsequent run will be not run.. But still thread is counted.. Consider 800 is success and 200 login is failing still it shows Active 1000 Started: 1000.

I dont want the thread which is failed on validate password, How to stop the thread which is failed and instead getting new thread.. I want thread which runs all the steps.

Upvotes: 0

Views: 1694

Answers (2)

Rohit
Rohit

Reputation: 611

use Action to be taken after a sampler error option in thread group, enter image description here

In your case if you wish to stop thread on error you can check stop thread option , but remember if you check stop thread it wont start any further iterations.

If you wish to stop thread and start a new iteration on error you can check start next thread loop option

For more information on thread groups follow this link

Upvotes: 1

sunny_teo
sunny_teo

Reputation: 1999

You can use thread group to stop thread if sampler fails. Check below option if it satisfies your requirement:-

enter image description here

Hope this helps.

Upvotes: 0

Related Questions