Forum Discussion
SmartBear_Suppo
Alumni
12 years agoHi,
As an FYI SmartBear support does not support custom groovy solutions.
You should add a RequestFilter.filterRequest event handler and use the following code as an example:
This will clear existing attachments and add new attachments in the request.
Please see the API documentation and event handler documentation.
http://www.soapui.org/Scripting-Propert ... dlers.html
http://www.soapui.org/apidocs/pro/
Regards,
Marcus
SmartBear Support
As an FYI SmartBear support does not support custom groovy solutions.
You should add a RequestFilter.filterRequest event handler and use the following code as an example:
// clear existing attachments
for( a in request.getAttachments() ) {
request.removeAttachment(a)
}
// get files and attach
new File("C:\\temp\\Test Requirements" ).eachFile{file ->
if(file.name.endsWith(".html" )){
request.attachFile(file,false)
}
}
This will clear existing attachments and add new attachments in the request.
Please see the API documentation and event handler documentation.
http://www.soapui.org/Scripting-Propert ... dlers.html
http://www.soapui.org/apidocs/pro/
Regards,
Marcus
SmartBear Support