Contributions
Re: replace tag value with content from file
Found a way; in addition to writing the desired value to a property I created a new test step of the type "Property Transfer" that injects it into the xml. Took ages to find I lost much time trying to replace the xml content directly.2KViews0likes2Commentsreplace tag value with content from file
Hello, I am trying to automate testing of a web service by filling in tags in my request(s) with values coming from a file. Since the "Data Source" test step is not available in SoadUI open source I am trying to implement groovy scripts as described in https://learnsoapui.wordpress.com/2012/05/19/groovy-datasource-teststep-dataloop-teststep-using-groovy-in-soapui/ This works actually quite well; I can read all values in my file and the values are written into the Property - Looper / Value field in a successive manner. However, the script does not actually update the xml of my mock request; I could not even find a statement that tries it. I wanted to use a statement like this which should replace the content of the the tag ltNomenclature with the value read from file present in the tempValue variable: def node = xml.'testCase'.findAll { it.name() == 'ltNomenclature' }.each{ it.replaceBody(tempValue) } However, this is not all that is needed, xml must be defined beforehand. How can I do this to make it reference my mock request ? All examples that I found in the forums concern parsing xml from file using xmlslurper but not from within the test case suite itself. Many thanks for any hints you could give. Cheers, Uwe2KViews0likes3Commentsalways get connection refused from https://testpro.douane.gouv.fr/rita-s/ServiceMoteurTarifaireTiers
Hello, I am always getting a connection refused error when trying to hook up with the French customs web service as indicated above. The service itself is not at an https address but a simple http which I find odd (Disclaimer: I am just starting to explore web services so that is probably normal for anyone else except me). I have followed the tutorial (https://www.soapui.org/soap-mocking/tips-and-tricks/securing-mockservices-with-ssl.html) for the basic SoapUI setup and supplied the user name/password and the other mandatory information when calling the service (note that the service definition marks all xml elements as optional which is not right following the attached document; at least a user name "ltIdentifiant", password "ltIdentifiant" and also a date value "ltIdentifiant" is required). Unfortunately I am stuck on this. Anyone who could give me an advice what to check out ? The ssl settings are there in SoapUI for the mock service with the key store and everything but to no avail. Regards and thanks in advance.Solved11KViews0likes2Comments