You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by Vladimir Sitnikov <si...@gmail.com> on 2023/05/31 21:04:39 UTC

PR 5944: Editable checkboxes

Hi,

I'm about to finish work on "editable checkboxes" UI element in
https://github.com/apache/jmeter/pull/5944
It fixes 20year old bug https://github.com/apache/jmeter/issues/1252 :)

It enables users to configure expressions in UI for cases when checkboxes
were used previously.
For example, checkboxes on Test Plan element, "use keepalive" in HTTP
Sampler, and so on.

It would be great if somebody else could review and/or test the feature.

Even though the change might look non-trivial, I think it could be polished
before 5.6 (which is long overdue).

----

Each JCheckBox needs to be migrated individually, however, the migration is
not complicated.
Here's a commit that updates TestPlan UI:
https://github.com/apache/jmeter/pull/5944/commits/b6468e1960dee9ddced7e43636dba0cf5528f078

For now I migrated checkboxes on Test Plan and some of checkboxes on HTTP
Sampler.

----

The change makes it easier to create programmatic test scripts as well.
For instance, here's how BeanShellSampler can be populated:

val sampler = BeanShellSampler().apply {
    name = "BeanShell Sampler"
    props {
        it[script] =
"""ResponseMessage="COUNTER=${"$"}{__counter(FALSE)}""""
        it[filename] = ""
        it[parameters] = ""
    }
    TestElementPropertyTransformer.USE_FUNCTIONS.visit(this)
    isRunningVersion = true
}
val result = sampler.sample(null)

Vladimir