0

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!

1 Answer 1

5

__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:

JMeter JDBC From File

See Apache JMeter Functions - An Introduction to get familiarized with the JMeter Functions concept

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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