> Can the kotlin templating mechanism be switched off in that case?

Unfortunately, there's no way to switch it off yet.
The issue is known as https://youtrack.jetbrains.com/issue/KT-2425

>I don't understand it, can you give an example?

testPlan {
    var orderId by variables.regex()
    http {
        url = "example.com"
        extractRegex {
            storeTo(orderId)
            // or variable = orderId
        }
    }
    http("example.com/orders/$orderId")
    http(".../${orderId.random}")

In other words, orderId "allocates" a variable name (e.g. orderIdVar), then
regex extractor is configured to store the value to "orderIdVar"
Later, $orderId is Kotlin expression that calls orderId.toString() which
would return the variable name "orderIdVar"

>I wanted to ask about the intended usage. How should those possibilities
map to the elements?

That is the key question :)
They all will be useful.

>Currently we get the JMeterContext by a static function and everyone
would get the same context. That is no problem when used inside the GUI,
but might be a problem, when used by developers in other circumstances
(and not aware of this)

That is sad indeed, yet it it does not block DSL implementation. It would
be great to lift that restriction and make JMeter less static in the future.

Vladimir

Reply via email to