2

After searching for a long time I was not able to find a proper solution or documentation on how to run predefined JDBC JMeter Test Suites from java code. The tests have been defined in the JMX format.

I know that you can run it with the jmeter-n.cmd, but I need to execute the test from within my code. Also, the Runtime.exec solution (as described in the link) is not feasable, as I cannot go out of my JVM.

How to create and run Apache JMeter Test Scripts from a Java program?

Using the JMeter API or GUI, I was able to create some http and JDBC tests - but not run predefined ones. Creating JDBC tests in the API did not work at all. There is some basic documentation around, but I can only find solutions on how its done in the GUI.

Thanks and best regards

Community
  • 1
  • 1
Echinus
  • 21
  • 2

1 Answers1

0

Refer to 5 Ways To Launch a JMeter Test without Using the JMeter GUI guide, it provides walkthrough on how to launch existing .jmx file from Java code and additionally clarifies how to build a JMeter test plan via API.

Dmitri T
  • 159,985
  • 5
  • 83
  • 133