apache / jmeter

Apache JMeter open-source load testing tool for analyzing and measuring the performance of a variety of services
https://jmeter.apache.org/
Apache License 2.0
8.43k stars 2.11k forks source link

Use same spelling sampleResult in all dynamic samplers, functions, assertions and listeners #6369

Open FSchumacher opened 1 month ago

FSchumacher commented 1 month ago

Description

Harmonize the spelling of the SampleResult variables used in scripting components.

Motivation and Context

In scripting listeners, assertions functions and samplers the SampleResult object is often given in the the scripting context via a variable. That variable should have the same name in all those components. This PR uses the spelling sampleResult in favour of SampleResult, as the variable points to an instance and in Java instances are named starting with a lowercase character.

This issue has been described in #6368.

One could argue to use the old name SampleResult as it might be found in more existing test cases.

As the next version of JMeter will be a major version, we could use this to deprecate the old writing and remove those in a later major version.

How Has This Been Tested?

Test cases have been adapted to use the new and old spelling.

Screenshots (if appropriate):

Types of changes

Checklist:

FSchumacher commented 1 month ago

LGTM. However, I am afraid we have to support the old spelling for quite some time (e.g. 5+years) so we do not break users's scripts.

Yes, we will have to support both spellings for a long time. But I always dream, that we could deprecate and remove some stuff :)