0
votes

So, I have 7 functionalities as below for simplicity.

  1. Create customer - 10
  2. Search customer - 100
  3. Delete Customer - 10
  4. Edit Customer - 30
  5. Open Account - 10
  6. Search Account - 100
  7. Delete Account - 10

Now I want to simulate all of the above functionalities together in one test plan. For all functionalities, I need to login only once and then once all users for all functionalities are logged in, continue the respective activities for a period of 1 hour.

What I tried:

  1. Place each functionality in separate thread group. For each thread group, keep login and logout separately and all other actions in a runtime controller having a runtime of 3600 mS. This serves the purpose but the timer of all users will be different (based on the time they login) which does not allow all users to start their period of 1 hour simultaneously.
  2. Use ultimate thread group for each functionality and put login and logout in separate once only controller (login at start of thread group and logout at end) and other actions in loop controller with loop count checked as infinite. This works fine but it did not execute the log out once only controller at the end of the test.

The aim of doing this is to achieve the concurrency of desired users and also to run with achieved concurrency for desired duration of time.

Any suggestions on how can I go about with achieving this?

1

1 Answers

1
votes

I would suggest the following approach:

  1. Put your "login" logic into the setUp Thread Group
  2. Put your "logout" logic into the tearDown Thread Group
  3. Distribute the load across your "7 functionalities" either by putting them into different Thread Groups or via Throughput Controllers

You can pass the user identity (cookie, token, whatever) using one of the following options:

  1. Inter-Thread Communication Plugin
  2. __setProperty() function in the setUp Thread Group to write the identity into a JMeter Property and __P() function in other thread groups to read the values. Of course you should add __threadNum() function as the property name prefix/postfix to distinguish the identities for different users