On 07/04/06, Sonam Chauhan <[EMAIL PROTECTED]> wrote: > > > On another topic - can JMeter be set to stream results / log > entries to > > > another application as testing occurs (as opposed to processing the > log > > > file when tests complete). > > > The latest code has a BeanShell Listener if you want to play with that > > ... it could be used to generate a separate output stream. > > Thanks for your informative comments Sebb. A fast & flexible solution > could use a Beanshell script to 'listen' to <sampleResult> log entries > as they are generated and post them to an XML-RPC server using a Java > XML-RPC client. > > For instance, using the Apache XML-RPC Java client > (http://ws.apache.org/xmlrpc/client.html) to post to a Perl XML-RPC > server (eg: > http://search.cpan.org/~byrne/SOAP-Lite-0.67/lib/XMLRPC/Lite.pm). > > The Apache client can operate in 'streaming' mode - not sure about > Perl's XMLRPC::Lite's server. > > Any pointers to how can a Beanshell script 'subscribe' to log entries as > they are generated, and push them into a stream?
The BeanShell Listener does not get log entries - it gets samples, as do all other listeners - so you would need to extract the appropriate fields from the sample. For example the script print(sampleResult) would dump output on System.out. > Sincerely, > Sonam Chauhan > -- > Corporate Express Australia Ltd. > Phone: +61-2-9335-0725, Email: [EMAIL PROTECTED] > > -----Original Message----- > From: sebb [mailto:[EMAIL PROTECTED] > Sent: Friday, 7 April 2006 4:03 AM > To: JMeter Users List > Subject: Re: log file formats - upgrade problem > > On 06/04/06, Sonam Chauhan <[EMAIL PROTECTED]> wrote: > > Thanks Sebb. I found the problem - we were been already using the '-p > > <property_file>' parameter for parameters used by our parameterized > test > > scripts. This meant Jmeter ignored it's property file, which were OK > > till 2.1.1 gained a new "file_format.testlog=2.0" setting. Hence I > added > > "-Dfile_format.testlog=2.0" to our invocation. > > > > Yes, I see the NPE in jmeter.log. I had put up documentation on the > > 1.9.1. log format on the wiki (LogAnalysis section) earlier. Once I > > finish, I'll add documentation on the default 2.1.1 log format > > Thanks! > > > (file_format.testlog=2.0). Do correct any fault in my assumptions > > below: > > > > > --------------------- > > > <sampleResult timeStamp="1144217221253" ...><assertionResult > > > ...></sampleResult> > > > --------------------- > > > This resembles the old log format, but has different nested > elements: > > > - The old practice of representing 302 redirects as <sampleResult> > > > subelements is gone. > > > - New <assertionResult> subelements now occur under <sampleResult>. > > > > > > A comment regarding the new log format: From what I understand, the > new > > log format will use <httpSample> for the HTTP sampler and > <sampleResult> > > for the JDBC sampler. Just from a automated log processing point of > > view, having uniform <sampleResult> element for all log entries is > more > > predicatable. Alternatively, where specialized elements like > > <httpSample> are used, some documentation on the special elements > > (perhaps a DTD?) would be needed to properly process logs. > > Yes, it uses different node names for the different sample types. > > At present different classes are needed to handle the two sample > types; not sure how easy it would be to combine these. > > > On another topic - can JMeter be set to stream results / log entries > to > > another application as testing occurs (as opposed to processing the > log > > file when tests complete). This other application could be, say, a > > generic testing engine (as in our case), syslog, a system management > > framework, etc. > > Potentially one could write a different processor. > > Not sure how easy it would be to integrate it. > > The latest code has a BeanShell Listener if you want to play with that > ... it could be used to generate a separate output stream. > > > I was browsing some entries in jmeter.properties and came across these > > entries for JMeter 'remote testing' below. > > Is it possible to easily adapt JMeter remote testing to stream results > > to another application? > > Dunno. > > > What protocol do the master and remote servers > > use to communicate with each other? > > RMI - the samples are returned to the client. > > > ----------------------------------- > > # Remote batching support > > # default is Standard, which returns each sample > > # Hold retains samples until end of test (may need lots of memory) > > # Batch returns samples in batches > > # hold_samples was originally defined as a separate property, > > # but can now also be defined using remote.mode > > #mode=Standard > > #mode=Batch > > #mode=Hold > > #hold_samples=true > > #num_sample_threshold=100 > > #time_threshold=60000 > > ----------------------------------- > > These just affect when the samples are returned. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

