Reputation: 888
I would like to know the Application of Pre-Processor and Post-Processor in JMeter.
Upvotes: 1
Views: 3194
Reputation: 8571
As name suggests these components are used to process something (request, response, custom operations) before and after the sampler (request).
Pre processors :
These components are used before the request to perform custom actions.
Ex: Suppose If I want to add something to request before sending it to server then preprocessor is added. For example if could be fetching some information from DB or Regex operations. Thus after performing those operation we can pass results of these actions to request. Thus we can modify/update request or request parameters before sending request to server.
Post processors : These components are used after the response of request has arrived to perform custom actions.
Ex: Suppose If I have asked for something on google and I want to find out something from response for below actions,
Then post processors can be used.
See above snapshot,
Components pointed by arrow will be executed before request is sent to server and components within square will be executed after response has arrived.
I hope this was helpful.
Upvotes: 1
Reputation: 168157
Pre Processors are designed to provide any setup actions required for the test sample like generate some unique test data or amend parent sampler dynamically
Post-Processors are designed to tear down the sampler, or most commonly to extract "interesting" bits from response for later re-use (this is called "correlation")
Pre and Post Processors execution time isn't included into test reports. If you want to change this behavior you need to use Transaction Controller
Upvotes: 0