To design a test plan for performance testing using JMeter for an interval of time with the given requirement of running a thread for one user for 55 minutes and then running another user after 30 minutes, you can follow these steps:
Create a new test plan and add a thread group to it.
In the thread group, set the number of threads to 1 and the ramp-up period to 1 second. This means that one user will be simulated and will start running immediately.
Add a timer to the thread group by right-clicking on it, selecting Add -> Timer -> Constant Timer
. Set the Thread Delay
field to 30 minutes (in milliseconds, this is 1800000) to delay the start of the second user.
Add a new thread group to the test plan by right-clicking on the test plan and selecting Add -> Threads -> Thread Group
.
In the new thread group, set the number of threads to 1 and the ramp-up period to 1 second. This means that one user will be simulated and will start running immediately after the timer delay.
Add a duration controller to the second thread group by right-clicking on it, selecting Add -> Logic Controller -> Duration
. Set the duration to 55 minutes to simulate the activity of the user.
Add the necessary HTTP requests and samplers to the thread groups.
That's it. Now run your test.
Edit:
Understanding from the edit in your question, you can add the Constant Timer to the Test Plan instead of the Thread Group to achieve the desired behavior. Here's how it will work:
Add a Thread Group with 1 user and set the duration to 55 minutes.
Add the sampler(s) to this thread group that you want to run for the first user.
Add a Constant Timer to the Test Plan with a value of 1800000 milliseconds (30 minutes). This will create a delay of 30 minutes before the second user starts.
Add another Thread Group with 1 user and set the duration to the remaining time after 30 minutes, which will be 25 minutes.
Add the sampler(s) to this thread group that you want to run for the second user.
Run the test plan and the first user will run for 55 minutes, and after 30 minutes the second user will start running and continue for 25 minutes.
Here's an example of how the Test Plan could be designed with the above configuration:
Test Plan
- Thread Group 1 (1 user, 55 minutes duration)
- Sampler(s) for first user
- Constant Timer (value: 1800000 milliseconds)
- Thread Group 2 (1 user, 25 minutes duration to end the threads simultaneously or else 55 minutes to run both threads for equal duration)
- Sampler(s) for second user
Note: The duration of the second thread group can be adjusted based on the remaining time after the 30 minutes delay.
I hope this solution helps you design your test plan for performance testing using JMeter for an interval of time as per your requirement.