We can organize the test under different controllers according to the logic we want to implement. These can include If Controller, Loop Controller, While Controller, Switch Controller, Transaction Controller, Random Controller, Once Only Controller, and ForEach Controller.
Assertions are one of JMeter's fundamental functions, allowing automatic verification of responses during the test. These can be organized under Requests. Response Assertion enables verification of responses during the test, checking if the responses contain the expected pattern or expression. For JSON testing, there is a separate JSON Assertion that allows verification of JSON responses.
Timers are useful for regulating the timing between requests during tests. They help simulate real-world delays between unexpected requests. You can place them between different Requests or Request groups, for example, to wait 20 seconds before the next Request, wait for a random amount of time, or specify a random time between 10 and 20 seconds before the next Request is executed.
Pre-processors are elements that perform preparatory tasks before Samplers. They allow data preparation, variable setting, HTTP request preparation, etc. These can be written in different languages. JMeter offers various types of Pre-Processors (e.g., User Parameters Pre-Processor, JSR223 Pre-Processor, BeanShell Pre-Processor), each serving different purposes. Pre-processors are generally placed under Sampler elements in the test plan, allowing specific preparatory tasks to be performed before the given Sampler.
Post-Processors are similar to Pre-Processors, but they perform processing tasks after Samplers. They allow response processing, data extraction, and variable setting. JMeter offers various types of Post-Processors, each serving different purposes, such as extracting data from responses (e.g., Regular Expression Extractor, JSON Extractor, XPath Extractor). Post-processors are generally placed under Sampler elements in the test plan, allowing specific processing tasks to be performed after the given Sampler. The most common use of Post-Processors is data extraction from responses, for example, using the Regular Expression Extractor to extract certain data from an HTML or JSON response.
There are different types of Config Elements. For example, HTTP Request Default, User Defined Variables, HTTP Cookie Manager, HTTP Header Manager, and CSV Data Set Config.
The Test Fragment element is a special type of controller that is at the same level as the Thread Group in the Test Plan. It differs from the Thread Group in that it is only executed when referenced by a Module Controller or a Include Controller. This element is exclusively used for code reuse within test plans.
JMeter can be extended with
plugins, which can be obtained from the
plugins‒manager.jar page and used in our tests.