Contributions
Re: Scripting WebService call
Seems I have myself fixed up with a properties step and a few transfers, which is fine. I'd rather handle it through scripting though, but oh well... My last problem now is that after my groovy loop, the test continues as normal - and runs the very last data through the webservice 1 extra time. Can my groovy script issue a STOP command or something to end the test once the loop is done?14 years agoPlace ReadyAPI QuestionsReadyAPI Questions641Views0likes0CommentsScripting WebService call
I have a groovy script in which I basically want to loop over the results from a previous webservice call, snag the results, and send a subsequent webservice request. (In a nutshell - make call A to get 10 IDs from system, loop 10 times and make 10 requests). I have the loop in place and can access the 10 responses.... My script is ... def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context ) def requestHolder = groovyUtils.getXmlHolder ("getFeatureRights#Response" ) requestHolder.declareNamespace("ns2","http://host:port/webservices/PermissionWebServices/") def featureRightList = requestHolder.getNodeValues("//ns2:getFeatureRightsResponse[1]/featureRights"); int counter = 1 int loopControl = featureRightList.length + 1; while (counter < loopControl ) { def classId = requestHolder.getNodeValue("//ns2:getFeatureRightsResponse[1]/featureRights[" + counter + "]/classificationId[1]"); def featureRightId = requestHolder.getNodeValue("//ns2:getFeatureRightsResponse[1]/featureRights[" + counter + "]/id[1]"); testRunner.testCase.testSteps["addGroupFeatureRights"].setPropertyValue("classificationId", classId) testRunner.testCase.testSteps["addGroupFeatureRights"].setPropertyValue("featureRightId", featureRightId) // run the webservice def result = testRunner.runTestStepByName("addGroupFeatureRights"); String status = result.getStatus().toString(); log.info (status); counter++; } [code] I have 2 questions.... 1. The addGroupFeatureRights is the webservice call I wish to make. Am I correct in the way I'm attempting to set the properties in that call? 2. The webservice call... The classificationId tag, for example, is just <classificationId></classificationId> Do I need to put anything in the tag to tell it to reference the value that I'm passing in? Thank you in advance for any help. Aaron14 years agoPlace ReadyAPI QuestionsReadyAPI Questions2KViews0likes1CommentStep through test
I'd like to use SoapUI in a demo. During the demo, I'd like to step through a test, step 1, step 2, step 3, explain a few things, step 4, step 5, etc... Is there a way to STEP through a test or project? I have found a way to pause the steps, but I haven't found a way to truely step through. Is this possible and how would I do this?15 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.1KViews0likes1CommentRe: SOAPUI - UPLOADING A FILE
I'm finally getting back to testing and uploading files... And my setup is failing. I have a post request that passes in one file. I specified the one file in the attachments and have branded it as multipart/form-data because my application is checking for that... I get my one parameter and I get my file in the servlet, but my debug shows... item = name=null, StoreLocation=C:\DOCUME~1\AEHREN~1\LOCALS~1\Temp\upload_233f43a7_11ff6bd4b30__7ffd_00000005.tmp, size=16550bytes, isFormField=true, FieldName=baseball.jpg First off, why is the name null? Secondly, why is FormField true? When using a JSP, formField shows as false? Both of these values are giving me headaches. Any thoughts?2.9KViews0likes0Commentspopulate multiple webservice nodes from datasource for 1 webservice call
I know how to write a DataSource to select 100 IDs. I know how to inject them into 100 webservice calls actiing on each ID. But, is it possible to take those 100 IDs and put them into 100 IDs as child nodes inside of 1 webservice call? How would I do that? Is there an example anywhere on that? I couldn't easily find one, unfortunately. aaron1.6KViews0likes1CommentRe: SOAPUI - UPLOADING A FILE
I'd like to use a groovy script to attach the file, but this is probably a question I should have asked long ago.... How do I know the syntax to use? Is there a Groovy API somewhere? A soapUI api somewhere? I feel a lot of my questions might have been avoided if I truly knew where to look for an api-type answer. aaron10KViews0likes0CommentsRe: SOAPUI - UPLOADING A FILE
Ideally, just the filenames. So, store the filenames in a datasource and retrieve the name. I can do this.... But how do I build the actual HTTP Request with the changing filename representing the file I want to attach? That's my core question. aaron10KViews0likes0CommentsRe: Strategy needed - What would I use for this?
But it appears now that I'm at the point to run my load test....I have one more issue. My Datasource does the SELECT ID from and this works... My load test does 20 concurrent threads and uses ThreadIndex so I know that I have 20 different users.... But the last thing in each test is to send across a HTTP request....the request debug is printing with users 1..20 like expected, but they all have the same ID from the datasource. Do I have to add something from the datasource in my transfer property to tell it to increment the results from the datasource?1.6KViews0likes0Comments