MVN jmeter Hashtree I/O error for running through java code

236 views Asked by At

Pretty new to jmeter and i am trying to Run an existing JMeter Test from Java code i read from the link below.

https://www.blazemeter.com/blog/5-ways-launch-jmeter-test-without-using-jmeter-gui

But when i try to follow the instruction im getting a java error. Can someone point out what im doing wrong? Im pretty new to this.

enter image description here

1

There are 1 answers

2
Luciano van der Veekens On

The message is pretty clear. SaveService#loadTree no longer accepts an input stream, it wants a file. The link you're referring to was written a couple of years ago, at the time it used a version of the library that still accepted an input stream.

Change

FileInputStream test = new FileInputStream("src/test/jmeter/ssoLogin.jmx");

to

File test = new File("src/test/jmeter/ssoLogin.jmx");