Forum Discussion
- Hi,
Do you mean you want to read and send an HTTP/XML request from a file? Or do you want to return an XML file in a response to a MockService!?
thanks,
/Ole
SmartBear Software - HMuneerNew Contributor
SmartBear Support wrote: Hi,
Do you mean you want to read and send an HTTP/XML request from a file? Or do you want to return an XML file in a response to a MockService!?
thanks,
/Ole
SmartBear Software
Yes I mean to read and send HTTP/XML requests from file. As we have http/xml log files that we gather from our production machine and we want to reply that in our test environment for performance evaluation. - Hi,
sure - you can set up a DataDriven test using the Directory DataSource to read the requests from a file - add one property to the DataSource (it will contain the contents of the file) and insert it into the request body using either a property-transfer or property-expansion.
Does that help?
regards,
/Ole
SmartBear Software - HMuneerNew ContributorCan you provide little more detail as I have just one big file that contains few thousand XML request logged/recorded from Production machine as I understand directory datasource pick new file for each iteration but how it works in this case. More how to integrate with loadui that each user send a unique request from the file to the target webserver.
-Hassan - Hi Hassan,
hmm.. In that case I would suggest creating a groovy datasource that simple reads the file one-request-at-a-time and insert each request into a datasource property that can then be used accordingly. Have a look at http://soapui.org/Scripting-Properties/ ... -datasinks to get the basic structure of a Groovy DataSource..
Hope this helps,
regards,
/Ole
SmartBear Software