0

I am new to Jmeter and I have been struggling with my test plan.

Test plan steps:

  • Enters the site
  • Creates multiple wish lists (like the wish list on amazon)
  • In the wish list dashboard the order of the list is constantly updated based on the most recently edited list on the top of the page
  • I have multiple threads entering this dashboard and editing the wish lists
  • I am using multiple if statements to validate the position of the wish list (based on name) the current thread wants to modify.

Problem:

  • The problem is that after that if statement when I try to click edit (POST request) on the desired wish list associated with the current thread the page crashes
  • The reason behind the crash is a race condition. Before I can post the position of the page, the location changes (another thread has created or modified a wish list)
  • I have tried using Critical Section Control but that will not work be because the other thread can be working on editing the wish list which can change the order on the dashboard.

Question:

  • Is there a way on Jmeter where I can pause the all the thread other than the current thread when I am at the Dashboard Post request?
0
  1. If your application should allow concurrent modification of the same wish list by different users - it's an application bug which needs to be resolved
  2. If your application doesn't allow concurrent modification of the same wish list by different users - your test is badly designed, you need to amend it and ensure that each thread (virtual user) is using different wish list. There is __threadNum() function which allows getting the ID of current thread (virtual user), you can use this information in order to distinguish users/threads
  3. If your scenario is more complex you can consider using i.e. Inter-Thread Communication Plugin, you can implement whatever scenario of IPC you want using it. Inter-Thread Communication Plugin can be installed using JMeter Plugins Manager
| improve this answer | |
  • The modification in being performed to different wish lists. But all the wish lists reside on the wish list dashboard. Whenever I attempt to choose my desired wish list from the dashboard, the order changes (this is because the wish list order is constantly being updated as the multiple wish lists are being modified). It's like 1 account with multiple users (with 1 wish list per user). – sam Dec 19 '19 at 13:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.