A Test Plan defines and provides a layout of how and what to test: the web application as well as the client server application. It can be viewed as a container for running tests. It provides a framework in which it will execute a sequence of
operations or tools to perform the testing. A test plan includes elements such as thread groups, logic controllers, sample-generating controllers, listeners, timers, assertions, and configuration elements. A test plan must have at least one
thread group.
The simplest Test Plan normally includes the following elements:
• Thread group—These elements are used to specify number of running threads, a ramp-up period, and loop-count (no. of times to execute the test).
Each thread simulates a user and the ramp-up period specifies the time to create all the threads. For example with 5 threads and 10 seconds of ramp-up time, it will take 2 seconds between each thread creation. The loop count defines the number of times the test will repeat for the thread group.
The scheduler also allows you to set the start and end of the run time.
• Samplers—These configurable elements are used to send HTTP, FTP, SOAP/XML, JDBC, or LDAP requests to a server.
• Listeners—These elements are used to post-process request data. For example, you can save data to a file or illustrate the results with a chart. At this moment the JMeter chart does not provide many configuration options; however it is extensible and it is always possible to add an extra visualization or data processing module.
例如:
As you run JMeter, Test Plan will appear as default component along with
Workbench on the left pane of the window.
The Test Plan Control Panel looks like this:
Workbench on the left pane of the window.
The Test Plan Control Panel looks like this:
If checked, this feature will save all information, including the full response log data and the default items, which are: time stamp, the data type, the label, the thread name, the response time, message, code, and a success indicator.
Option Run each Thread Group separately: If you have two or more Thread Groups in your Test Plan, selecting this will instruct JMeter to run each serially. Otherwise, JMeter will run Thread Groups simultaneously or in parallel.
Add directory or jar to classpath: This additive feature allows you to add JAR files or directories in case you have created your own extension to the JMeter package you are using. However, you will need to restart JMeter if you remove any entry.
Alternatively, you can copy all the jar files to the jmeter | lib directory. Another way to include additional libraries is to edit the JMeter properties file. In the jmeter. properties file, look for the entry "#user.classpath=../classes;../jars/jar1.jar. Edit this to include additional libraries. Avoid naming paths containing spacesas this may cause problems for Java.
读书笔记:Apache JMeter