Contributions
Re: Setting soapUI testCaseproperties from a groovy script running in another soapui project
Hi nmrao, I understand your point of view, but my need was to manage light soapui projects (in other words, not a huge size), to easily and quickly export and share them with other colleagues (If I group all testsuites in a single project i get it with 150 MB size and over). That's why I had the requirement to set custom properties in an external project. In this way, I can load only the small project and its own testsuites I need to run along with the very small project containing all custom properties needed. I can figure that this is not a "standard" scenario, but I can assure it works. I'm using it right now.1.4KViews0likes0CommentsRe: Setting soapUI testCaseproperties from a groovy script running in another soapui project
I find it by myself, but put here the answer to help someone... So groovyScript1 must have the following content def project = testRunner.testCase.testSuite.project.workspace.getProjectByName("ENV_PROJECT") project.testSuites['TestSuite'].testCases['TestCase'].testSteps['groovySetPropStep'].run(testRunner, context) while the groovySetPropStep has for example the following content: testRunner.testCase.setPropertyValue("propAOfTestCase1 ", "someValue"); ....... testRunner.testCase.setPropertyValue("propBOfTestCase1 ", "anotherValue") I tried and it works... Good!1.6KViews1like2CommentsSetting soapUI testCaseproperties from a groovy script running in another soapui project
Hi to all, I have this scenario, in which TEST_PROJECT1 and TEST_PROJECT2 are similar test project but must remain two separate projects. What I am trying to implement is a unique external script (in ENV_PROJECT) that is called from inside each test project, and it shoul be able to change testCase properties inside the test project itself. For example: - ENV_PROJECT TestSuite TestCase groovySetPropStep - TEST_PROJECT1 TestSuite1 TestCase1 groovyScript1 SoapRequestStep1A SoapRequestSte1B .... - TEST_PROJECT2 TestSuite2 TestCase2 groovyScript2 SoapRequestStep2A SoapRequestStep2B ..... Now when I execute dor example TestSuite1, groovyScript1 should be able to run groovySetPropStep (passing the TestSuite1 context) so that groovySetPropStep can set testCase properties of TestSuite1. Is it possible? Or is there an alternative way to reach my target? Thanks in advance. UgoSolved1.6KViews0likes3CommentsRe: How to pass a list of nodes from a response to a new request
Many thanks,nmrao I am quite a newBie with groovy. I understand the prerequisites, but when i try to run the script you prepared, it gives me this error groovy.lang.MissingPropertyException: No such property: responseContentAsString for class: com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequest error at line: 13 at this statement def response = new XmlParser(false, true).parseText(getStep(-1).httpRequest.responseContentAsString) Thanks in advance1.7KViews0likes6CommentsRe: How to pass a list of nodes from a response to a new request
I attach two files (very long response and request): 1. response.txt from which I have to take travelSolutions data 2. request.txt the request I want to fill in with the travel solutions. The structure is that I described in my previous posts Let me know, please2.3KViews0likes9CommentsRe: How to pass a list of nodes from a response to a new request
Hello nmraohere you are The request should look like this <soapenv:Body> <sal:searchBase> <searchBaseRequest xmlns:ns2="http://ServiceModel/Model/Process/Coordinator/"> <serviceContext> <correlationId>247ed84a-7a50-41c2-a843-1b22ea9134e7@Bkn1-9y2zovkUQBM0zySf21</correlationId> <channelId> <id>8001001</id> </channelId> <lang>en</lang> </serviceContext> Here I have to put the travelSolutions list <offers> <id>12345</id> <base>1244</id> </offers> <offers> <id>12345</id> <base>1244</id> </offers> ...... ...... <offers> <id>12345</id> <base>1244</id> </offers> <otherFields> .... </otherFields>2.3KViews0likes12CommentsHow to pass a list of nodes from a response to a new request
Hi to all. I'm new in this community and I have a proiblem that is going me mad I searched in the community, but didn' t find what I am looking for. I have a SOAP response, composed by multiple complex nodes.For example <travelSolution> <field1>something</field1> <field2> <id>12345</id> </field2> <context> <searchCriteria> <departureTimesStart>2020-04-24T10:47:02.635</departureTimesStart> </searchCriteria> </context> </travelSolution> <travelSolution> <field1>something else</field1> <field2> <id>678</id> </field2> <context> <searchCriteria> <departureTimesStart>2020-04-24T10:54:02.635</departureTimesStart> </searchCriteria> </context> </travelSolution> <travelSolution> ....... ....... </travelSolution> What i want to do is to pass the list of travelSolution objects to the next request. I've tried with "property transfer" but it passes only the numer of objects already defined in the request. For example if in the response there is a list with five <travelSolutions> objects, but in the receiving request there are only three objects present, only the first three objects will populate the request. The number of <travelSolutions> objects is unpredictable. I want to transfer them all, to the new request for subsequent processing. I've tried with a groovy script but I'm facing problems because DOM3 level is not supported I'm using soapUI free edition 5.5 May someone please help me? Thanks in advanceSolved3.1KViews0likes18CommentsRe: How to pass a list of nodes from a response to a new request
I try to explain better. I have a soapUI response (derived from a previous soap call) which is composed by 1..n <travelSolution> complex objects. This means that any travelSolution is composed of subNodes and values, as you can see in my main post. I want to pass the complete list of <travelSolution> nodes to the subsequent request to execute further processing. Please refer to my main post to read which troubles I'm facing using SoapUI property transfer step. Hope now it's more clear. Thank in advance2.3KViews0likes14Comments