Helder De Baere
Helder De Baere

Reputation: 450

Can you alter standard JMeter XML output in your plugin?

I made a custom SampleResult and have overriden the response data in the plugin. I used "JMeterUtils.setProperty(OUTPUT_FORMAT_PROP, XML);" to set the XML output in runtime. The problem is that when I run JMeter in non gui mode and run the tests, the output is in a format I don't need. (I don't want to save the saveconfig settings etc, only my response data). I also made a complete custom logging system for the tests, which is way more detailed than the standard logging and more in the specific way I want to log.

Although setting the save response data on true, it does not print it and the tag in the output is empty. Also, I think I found a few bugs in JMeter itself for writing to XML, sometimes it doesn't close it's tags like the 'label' tag.

Upvotes: 1

Views: 343

Answers (1)

UBIK LOAD PACK
UBIK LOAD PACK

Reputation: 34516

What you are trying to do is not possible, as property jmeter.save.saveservice.output_format is used in a static block on load of SampleSaveConfiguration.

So switch format just put in user.properties:

  • jmeter.save.saveservice.output_format=xml

If you use 2.13 version, there are no such bugs and if so you should open a bugzilla. I suspect issue is due to your custom code.

Upvotes: 1

Related Questions