One more thing to understand now is elements of the test plan. Once we understand all the elements of a test plan, we are ready to do performance testing on any web application using the tools JMeter.
Let us look at some of the elements of the test plan in JMeter. The first important element to understand in the test plan is Thread Group.
Thread Group
Let us understand what thread group in JMeter tool is. Thread group in JMeter is actually used to define the scenario of load testing in JMeter.
When I am talking about scenario it involves many things. It involves number of threads. Before moving further, we should understand what a thread in JMeter is. Thread in JMeter represents one virtual user.
If I am defining the Number of Threads (users) as 10 which means that we will put the load of 10 users on the server.
We can also use it for defining Ramp-Up Period in second. The ramp-up time is the time taken by JMeter to ramp up to the full number of threads that have been defined in the Thread Group setting.
If I am defining ramp up of 2 seconds and the number of threads we are putting as 10 which means that in two second all my 10 threads will be up and running and 5 Threads will start in one second. We can also define loop count.
Loop count means the number of iterations which we want the test to be performed or in simple words; we can say that it is the number of times for which we want to run the scenario.
Now there is one thing that we need to see prior to setting Thread Properties and understand it clearly. We need to see is “Action to be taken after a Sampler error” and we can see here that default value is Continue and which means that JMeter will ignore the error and move to the next element in the tree and it will continue running the thread.
Now there is another option stating Start Next Thread Loop which means that JMeter will stop the current thread and will start next thread execution, now the third option is to Stop Thread which means that the thread which is under current execution will stop.
Now next test option is Stop Test which means it will stop entire test execution and the last option is Stop Test Now which means that the entire test will be stopped by the pool then and there itself immediately.