2
votes

In JMeter test plan, why do I need JDBC post (/pre)proecssor when I can just use JDBC sampler?

If the relevant sampler will be before/after the request it will be same as JDBC Pre/Post processor

Also it seems more reusable option

1

1 Answers

1
votes

By default JMeter does not include the time required to execute any Pre Processors into sample result. Same applies to Post-Processors and Timers (unless you are using Transaction Controller configured to do so)

So I would use Pre Processor if it assumes some pre-requisities setup and I am not interested in its results timings.

If I need to measure the time required to execute a request - I would go for Sampler

Check out A Quick Guide to JMeter PreProcessors article for comprehensive information on using Pre Processors in JMeter tests.