资料内容:
plans are sets of requests against local or remote servers (or clients) configured to run by following specific instructions.
In the configuration of a test plan you can specify several input and output parameters and you can configure the basic conditions
that should be met so the test plan is successful or not.
JMeter test plans are composed of different components. Here is a list of the most important ones with instructions about how
you can add them using the JMeter UI and what their purpose is:
7.1
ThreadGroup
A thread group is basically a combination of different test plan elements. It is the root of a test plan and it controls the basic
central parameters.
In order to create a test plan you may have to create at first a thread group and configure its number of threads, the ramp-up
period, the loop counts and the behavior in case or error:
• Number of threads: The number of threads that are going to be used to execute the test plan, very important to configure load
and stress tests.
• Ramp-up period: Time that JMeter will need to start all threads.
• Loop count: Number of iterations, that is the amount of times that the test is going to be executed.
• Error behavior: What to do in case of error: Stop current thread, stop the whole test, continue. . .
A Thread Group has also the start and end time configuration options. By clicking the checkbox "Scheduler" a new section with
the schedule parameters will appear and you can configure the start and end time of your test.
Once this is configured you can start adding other test plan elements to your Thread group like samplers, listener and timers. We
are going to explain all these in the next chapters.
7.2
Samplers
Samplers are used for sending requests to different kind of servers. They are the basic element of every test plan and every
thing works around them: they execute requests (based on the configuration provided) and these requests produce one or more
responses that are analyzed afterwards.
Here is a list of the Samplers available in JMeter (we are going to see some of them in this tutorial):
• Access log sampler