I am quite new to Jmeter and trying to code and run jmeter using JAVA by following:
https://www.blazemeter.com/blog/5-ways-launch-jmeter-test-without-using-jmeter-gui/ https://bitbucket.org/blazemeter/jmeter-from-code/src/master/src/main/java/com/blazemeter/demo/JMeterFromScratch.java
if (jmeterHome.exists()) {
File jmeterProperties = new File(jmeterHome.getPath() + slash + "bin" + slash + "jmeter.properties");
if (jmeterProperties.exists()) {
//JMeter Engine
StandardJMeterEngine jmeter = new StandardJMeterEngine();
//JMeter initialization (properties, log levels, locale, etc)
JMeterUtils.setJMeterHome(jmeterHome.getPath());
JMeterUtils.loadJMeterProperties(jmeterProperties.getPath());
Cannot I use like this
StandardJMeterEngine jmeter = new StandardJMeterEngine();
JMeterUtils.getJMeterHome();
JMeterUtils.getJMeterProperties();
I am getting an error when I use the above code
ERROR org.apache.jmeter.save.SaveService - Can't compute checksum for saveservice properties file Exception in thread "main" org.apache.jorphan.util.JMeterError: JMeter requires the checksum of saveservice properties file to continue
Cannot we point to the jmeter jar downloaded through Maven instead of pointing to jmeter property path ? Can anyone help me out ?