Contributions
Re: Setting ratio of requests when load testing
Necro my old thread rather than creating a new one. --- I am still having issues with this and have no idea how to go about it. If a load test contains multiple requests, does it choose one at random? If this is the case, how would I make my load test simulate a real load as mentioned in my previous post. Thanks.722Views0likes0CommentsRe: SoapUI Load Test Properties
OK so, I have managed to get it working. Rather than accessing the properties at a testsuite level, I access them at a test case level. I put the startup script in the test case and not the load test (although I am running the load test, makes no sense to me ...)1.8KViews0likes0CommentsRe: SoapUI Load Test Properties
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.1.8KViews0likes0CommentsRe: SoapUI Load Test Properties
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)1.8KViews0likes0CommentsSoapUI Load Test Properties
Hi, I have a test suite containing multiple properties, example below: Name: DynamicChangeId Value: ${=context.changeIds.get((int)(Math.random()*context.changeIdsCount))} changeIds is a list, changeIdsCount is the size of that list. The in-line groovy script above will select a random value from the list. The values are loaded into that list at the testsuite level in a "startup script", example below: // Load Change Ids from file try { log.info("Loading Change Ids from file ...") File file = new File('...\\Test_Data\\ChangeId.txt') context.changeIds = file.readLines() context.changeIdsCount = context.changeIds.size log.info("ChangeIdsCount: " + context.changeIdsCount) log.info("ChangeIds: " + context.changeIds) log.info("Change Ids loaded Successfully!") } catch (Exception e) { testRunner.fail("Failed to load data file") return } This all works fine at a testsuite level because I am able to access the properties via ${#TestSuite#DynamicChangeId} in a request. My Problem: When I create a load test (copying the startup script from testsuite) and try to access this property via ${#TestSuite#DynamicChangeId} 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) Is their anyway to setup dynamic properties in load tests in soap ui (like I've done above) ?2KViews0likes6CommentsRe: Setting ratio of requests when load testing
For Example: In 1 minute on average: 1 request to web method x 5 requests to web method y 24 requests to web method z So in one minute I would expect 30 requests to be made in total. The idea in the long run would be to step up the ratio's by different magnitudes i.e. 1.1, 1.5, 2 times etc ...722Views0likes0Comments