Hi,
Yes I meant to say Setup Script.
The properties are stored at the test suite level and I access them in the load test requests via ${#TestSuite#DynamicChangeId}.
I know I can access them because if I change that properties value in the test suite properties section to:
'hello world'
From ...
${=context.changeIds.get((int)(Math.random()*context.changeIdsCount))}
It works, in the request the in line groovy is substituted:
<inc:ChangeID>${#TestSuite#DynamicChangeId}</inc:ChangeID> ........ ====> ........ <inc:ChangeID>hello world</inc:ChangeID>.
I also know that context.changeIds.get((int)(Math.random()*context.changeIdsCount)) works if I paste it directly in the setup script but that doesn't make my properties dynamic which is the reason why this peice of inline groovy is in the test suite properties section; but for some reason it causes this exception:
groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.lang.Double#multiply.
Cannot resolve which method to invoke for [null] due to overlapping prototypes between:
[class java.lang.Character]
[class java.lang.Number]
at groovy.lang.MetaClassImpl.chooseMostSpecificParams(MetaClassImpl.java:2980)
at groovy.lang.MetaClassImpl.chooseMethodInternal(MetaClassImpl.java:2932)
at groovy.lang.MetaClassImpl.chooseMethod(MetaClassImpl.java:2875)
at groovy.lang.MetaClassImpl.getMethodWithCachingInternal(MetaClassImpl.java:1203)
at groovy.lang.MetaClassImpl.createPojoCallSite(MetaClassImpl.java:3079)