On 1 December 2011 14:21, Gero Vermaas <[email protected]> wrote: > Seb, > > Thanks for the quick response. I did check that site also. The PDF mainly > focusses on adding the GUI and I managed to do that by adding a subclass > of AbstractVisualizer and I can select that from JMeter GUI. I can then > receive the SampleResults in via the add(SampleResult sr) method and > intended to use a ResultCollector (slightly modified) to store the results. > However, when adding (modified) SampleResults to the > getModel().sampleOccurred() method nothing gets stored. > > How can I hook into the ResourceCollector to store the (modified) > SampleResults to a file that I specified?
Have a look at how ResultSaver does it. That works in non-GUI mode. > Regards, > Gero > > On Thu, Dec 1, 2011 at 1:20 PM, sebb <[email protected]> wrote: > >> On 1 December 2011 11:29, Gero Vermaas <[email protected]> wrote: >> > Hi, >> > >> > I want to extend JMeter such that I can catch the SampleResults and write >> > them to a file (in a slightly different format than done by the standard >> > elements). For that I implemented the SampleListener interface, created a >> > jar and dropped the jar in the lib/ext directory. However, the question >> now >> > is how do I include/register/... this new Listener in my testplan such >> that >> > the results can be written? >> > >> > It has to be run in command line mode so, creating a GUI component to >> catch >> > the listener events is not really an option. >> > >> > http://www.jajakarta.org/jmeter/1.7/en/extending/index.html#listenerdoes >> >> That website is seriously out of date (and nothing to do with the ASF) >> >> Have you looked at the Extending link on the main JMeter site >> http://jmeter.apache.org/ ? >> >> http://jmeter.apache.org/extending/jmeter_tutorial.pdf >> >> > not have the complete instructions and I could not find a working example >> > so far. >> > >> > Any suggestions are welcome. >> >> Since the GUI is used to create test plans and configure test >> elements, you need to create a minimal GUI. >> >> Otherwise, you will have to edit the JMX file to add the appropriate >> entries by hand, which will be hard work. >> >> > Thanks, >> > Gero >>
