0

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?

bumped to the homepage by Community 2 days ago

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

  • 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 '17 at 19:12
  • Yes it can, but if it is hard for you then use multiple JDBC Request for multiple queries. – kishor sharma Jan 23 '18 at 5:50
0

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, privacy policy and cookie policy

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