Hi nmrao,
If a setup script is in place will this only be run once? i.e. at the start of a test case / suite?
If this is the case then this will not make each request have different / randomised parameters, which is what I am trying to achieve.
This is the reason for using this statement in the properties section of the test suite:
${=context.changeIds.get((int)(Math.random()*context.changeIdsCount))}
This statement would randomize the value it picks from a list which has been initialised previously (in the set-up script).
If I try to access the
test suite properties in my
load test requests I get the following error:
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)
Note: the list of id's is generated in the load test Start-Up Script.