Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TestExecutionScope and ThreadGroupScope variables, deprecate TestElement implements TestStateListener #6194

Open
vlsi opened this issue Dec 19, 2023 · 0 comments

Comments

@vlsi
Copy link
Collaborator

vlsi commented Dec 19, 2023

Use case

In many cases, test elements need "per-thread-group-scope" variable or "per-test-execution-scope" variable.
For instance:

  • Timers use static final Map<ThreadGroup, timerState>
  • Summarizers might need their state as well
  • DB connection pool might need to pool connections

The current approach of element implements TestStateListener causes issues like #6174, #6165

Possible solution

We might need something like https://docs.gradle.org/current/userguide/build_services.html or https://github.com/google/guice/wiki/Scopes so the plugin authors can explicitly declare "per-test-execution state objects", so they do not need to implement TestStateListener in the test elements.

It might be worth deprecatign TestElement implements TestStateListener at least to discourage that usage pattern.

Possible workarounds

No response

JMeter Version

5.6.2

Java Version

No response

OS Version

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant