I have run the Jmeter Script using Jmeter dependency in eclipse using Java code, fortunately, my script is running fine but now I\'m unable to store the result for the same. Can
You need to add a ResultCollector instance to your Test Plan in order to get the .jtl file written like:
ResultCollector collector = new ResultCollector();
collector.setFilename("result.jtl");
testPlanTree.add(testPlanTree.getArray()[0], collector);
the code needs to be added before the jmeter.configure(testPlanTree);
line
More information: