apache / apache/jmeter

How to save custom sample results?

Open
#5,783 1 comment 0 reactions 0 assignees View on GitHub
documentation to-triage
Dominant language
Java
Stars
9.5k
Forks
2.3k
Avg merge
1d 22h
Merged PRs (30d)
5

Description

### The documentation URL

https://jmeter.apache.org/usermanual/jmeter_tutorial.html

### Feedback

How to save custom sample results?

I've read the documentation and searched a lot on 'jmeter plugins', but not found any useful answer.
I created `MySamplerGui extends AbstractSamplerGui` and `MySampler extends AbstractSampler`, and I want to have additional result fields that want to to show in the commandline summary, and the 'summary report' listener. For example, my service under test is an audio service that responses http multip parts that can either be audio or other text information. The audioLatency is time when first part of audio returned, despite the built in `latency` which means time of first part.

So I also created `MySampleResult extends SampleResult` and declared the new properties, and have `MySampleResult sample(Entry entry)` in `MySampler`.
Now I'm able to add my sampler to test plan in gui mode but when adding a 'summary report', I cannot see my additioanl properties, nor can I enable them in the 'Sample Result Save Configuration' dialog. seems this 'summary report' listener cannot automatically show custom properties.

Could anyone tell me the methods to get my custom fields in console and csv summary? Or tell me if it is impossible without modifying existing jmeter implementation. thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.