I'm creating a Thread Group, and before sample execution want to seed the database with test data. According to the JMeter manual, I need JDBC pre-processor.

I insert multiple insert queries into the pre-processor but it looks like it doesn't create an entry in database. I tried to replace the pre-processor with multiple samples - and everything is fine.

Can JMeter pre-processors receive multiple INSERT queries?

  • Did you try multiple pre-processors? I haven't used that one, but I think it is only one command per sample.
    – Ray Oei
    Oct 23, 2017 at 19:12
  • Yes it can, but if it is hard for you then use multiple JDBC Request for multiple queries. Jan 23, 2018 at 5:50

1 Answer 1


JMeter JDBC Test Elements execute SQL queries, any correct SQL query will be executed. Current design is "one element - one query", however you can try using UNION operator to merge 2 or more queries into one.

JDBC Test Elements can also be parameterised like any other test elements so you can call i.e. JDBC Request sampler multiple times and each time send to it different data via CSV Data Set Config

Also if you need to populate the database with test data I would recommend going for setUp Thread Group

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.