Reputation:
I am trying to run a couple SQL scripts in a Jmeter SetUp thread. Is it possible to run the SQL code from a .SQL file through Jmeter so I can initialize a database before my other threads get executed. I just don't want to break my code up and copy/paste code inside Jmeter using JDBC connection and JDBC request. Thanks!
Upvotes: 0
Views: 4961
Reputation: 168092
__FileToString() function seems to be something you're looking for, you can put it inside your JDBC Request sampler and specify path to your .sql file there like:
See Apache JMeter Functions - An Introduction to get familiarized with the JMeter Functions concept
Upvotes: 5