What's the minimum working DSL for plan? #122
Unanswered
AntonioSun
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Hi, in general you can't have two or more plans inside start element. It is the same way you can't have multiple tests plan in JMeter GUI. The problem which you see comes from the JMeter library not from the DSL. I'm not sure what you want to achieve here exactly but it should be more like this: @GrabConfig(systemClassLoader=true)
@Grab('net.simonix.scripts:groovy-jmeter')
@groovy.transform.BaseScript net.simonix.dsl.jmeter.TestScript script
start {
def p_stage = hasVariable('stage') ? stage : 'dev'
if(p_stage == 'prod') {
plan 'Prod test plan', {
}
} else {
plan 'Dev test plan', {
}
}
} In this way there will be only one plan in the output jmx. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've tried
But it's giving me problem that I have no idea how to fix:
I've also tried (but failed) with:
plan (name: 'Test plan', enabled: p_stage == 'prod') {
Beta Was this translation helpful? Give feedback.
All reactions