Contributions
Load Test Tool Bar: Does the Count, "cmt" reflect each test step or total of all steps executed
Hi, It seems odd that the count for all eight of my SOA test steps executes evenly. Can I assume this is the total and if so, how do I know the exact number each individual step was run? Steve267Views0likes0CommentsRe: MissingMethodException: No signature of method
So here is the solution for incrementing a parameter in a payload xml file, two requisites to the Groovy are: * A Property needs to be defined, in this use case it was called "incrementValue" * The value in-question needs to be 'parameterized', I'm 'P-izing' ReferenceId as follows: <req:ReferenceId>${Properties#incrementValue}</req:ReferenceId> // Calls the Pre-set Property "incrementValue and finally only four lines of script are required: def incrementValue = context.expand('${Properties#incrementValue}'); incrementValue=incrementValue.toInteger() + 1; incrementValue=incrementValue.toString(); log.info "incrementValue: " + incrementValue; // Optional as this simply prints the text in the groovy editor testRunner.testCase.getTestStepByName("Properties").setPropertyValue("incrementValue",incrementValue); I'm labeling this solution as solved, much thanks to Ritchie and others who provided valuable feed-back during the past two weeks. Cheers, wiseAcre3 years agoPlace ReadyAPI QuestionsReadyAPI Questions617Views0likes0CommentsRe: MissingMethodException: No signature of method
Ritchie, For this testing environment, the ReferenceID does not have a min or max length, it simply needs to be unique. I actually tried another solution where I used the java mathRandomUtils library to generate a random number, but that generated negative numbers too so I canned that. The IF statement with a max value is simply a loop control mechanism. No criticism taken, when I can get this whole thing worked out, I'll post it as a complete solution. wiseAcre3 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.3KViews0likes3CommentsRe: MissingMethodException: No signature of method
Ritchie, I'm still at loggerheads on this one: issue is still passing the incremented value to the xml payload, here's what I have including libraries. BTW: the udemy video I've been watching states that one must use the XmlHolder & the WSDL library. What's been killing me are "MissingMethodException" errors. I've included all of my attempts--commented out--to date. I've been stumped for so many hours on this, I decided to start a Groovy course from scratch. The Java Devs are too busy with their stuff so I'm left on my own. I'll get it eventually, question is "when is eventually?" Again, thank you for your interest in this issue. import java.util.Random; import org.apache.commons.lang.math.RandomUtils import com.eviware.soapui.support.XmlHolder //assists transfer'g values to payload import com.eviware.soapui.impl.wsdl.testcase.WsdlTestRunContext def ReferenceID = testRunner.testCase.getProperty("ReferenceID"); def RefID = ReferenceID.value = RandomUtils.nextInt(new Random()); //new Random(System.currentTimeMillis()); log.info (RefID); // Above works testRunner.testCase.setPropertyValue("ReferenceID", $('{#RefID}' + 1)); // Getting Missing Method Exception error with this //log.info context.expand('{$#TestCase#ReferenceID}'); //def RefID = testRunner.testCase.getPropertyValue ('${#TestCase#ReferenceID}'); //def xmlRef = new XmlHolder(RefID); //log.info context.extent(ReferenceID.value); //def RefID=testRunner.testCase.setPropertyValue("ReferenceID",('${#TestCase#ReferenceID}')); //def updateRef = new WsdlTestRunContext("ReferenceID"); //log.info context.expand("RefID"); // Call the service AddTestStep.run(testRunner,context)3 years agoPlace ReadyAPI QuestionsReadyAPI Questions674Views0likes0CommentsRe: MissingMethodException: No signature of method
Ritchie, This is my first experience using Groovy scripts and setting up a load test with multiple test steps, I've been using a Udemy course on Webservices/Rest API Testing so I have what I can only assume is a good reference. That said, the course does not cover all, here is my use case: 1. Eight test step requests from Oracle OIBEE projects have been gathered to form a Load Performance Test Suite 2. Each test step's payload.xml file needs to have the ReferenceID value incremented each time a request is sent otherwise the system will error and it will not be processed (nor assigned a TransactionID). 3. I have Groovy script incrementing the ReferenceID in the groovy console, solution was found on Stackoverflow as noted. 4. Now I need to sync the script with the payload.xml so each time I send a request from the test step itself, the RefID auto-increments. Currently, if I increment the Script and then execute a Request, the ReferenceID is incremented, but if I do NOT increment the Script and then execute a Request, the new Request shows the same ReferenceID as the previous one, though the TransactionID does increment, but that request is errored. 5. Finally, after my script is functioning, I'll use it in all 8 of the test steps so when I throw off a Load Test with the 8 test steps all of the requests will at least process to the extent that each request will be assigned a new Reference & TransactionID, whether they error in a system if they overload is another issue, but not my concern. Thanks for your interest. Stephan3 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.3KViews0likes5CommentsRe: MissingMethodException: No signature of method
Return of the MissingMethodException: This was the title of the initial post, but the problem / issue is Auto-incrementing a parameter in an xml payload. Here is working code for the Groovy editor, new to this script is addition of the XMLHolder library to update xml files: import com.eviware.soapui.support.XmlHolder //assists transfer'g values to payload def ReferenceID = testRunner.testCase.getPropertyValue("ReferenceID"); ReferenceID = ReferenceID.toInteger() + 1; if (ReferenceID < 990000) { testRunner.testCase.setPropertyValue("ReferenceID", ReferenceID.toString()); } log.info context.expand ('${#TestCase#ReferenceID}') // Create script to update the XML payload and auto-increment it for the next req def RefID = testRunner.testCase.getPropertyValue("ReferenceId"); // Create object for incrementing payload value testRunner.testCase.setPropertyValue("RefID", ${RefID.toInteger() + 1}); // NOW GETTING A 'MISSING METHOD EXCEPTION' error here def xmlAdd = new XmlHolder(RefID) //Create object for xmlHolder class xmlAdd.setNodeValue("//std:FSMSHeader/std:ReferenceId",RefID); // xpath to target param def newAddXml = xmlAdd.getXml(); // Update the param // Update the Custom Properties Values for the next request testRunner.testCase["<myTestCase>"].testSteps["add"].setPropertyValue("ReferenceId",newAddXml) Any advice on how to clear the Missing Method Exception Above? Also, obviously the payload.xml file has been updated as follows: <v1:ReferenceId>${#TestCase#ReferenceID}</v1:ReferenceId>3 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.3KViews0likes7CommentsRe: MissingMethodException: No signature of method
Rich, Thank you for your response, the script below works in the Groovy editor, will update if/when I confirm it is incrementing the xml payload parameter. Credit for this solution goes to Stackoverflow: https://stackoverflow.com/questions/55167067/soapui-how-to-increase-value-by-1-in-property-transfer-target // THIS WORKS INCREMENTING IN THE TEXT EDITOR def ReferenceID = testRunner.testCase.getPropertyValue("ReferenceID"); ReferenceID = ReferenceID.toInteger() + 1; if (ReferenceID < 990000) { testRunner.testCase.setPropertyValue("ReferenceID", ReferenceID.toString()); } log.info context.expand ('${#TestCase#ReferenceID}') Steve PS. I changed the name of the question to reflect the solution.3 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.3KViews0likes9CommentsRe: MissingMethodException: No signature of method
BTW: the "log.infor" is a typo I've already caught.3 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.4KViews0likes11CommentsMissingMethodException: No signature of method
RE: MissingMethodException: No signature of method Error on LINE 5 I'm trying to increment a param in the xml payload" ReferenceID, and getting the above-mentioned error: I changed the "setPropertyMethod" to "getPropertyMethod" and the error changed to "groovy.lang.MissingPropertyException: No such property: ReferenceID Again, I'm trying to increment the parameter, so the SET method makes sense to me def ReferenceID = context.expand ('${#TestCase#ReferenceID}'); ReferenceID = ReferenceID.toInteger() + 1; if (ReferenceID < 990000) { testRunner.testCase.setPropertyValue('${TestCase#ReferenceID}'); //LINE 5 Error log.infor "ReferenceID" + ReferenceID; testRunner.gotoStepByName("ReferenceID") } Any idears? Thanks, wiseAcre2.9KViews0likes13Comments