How to send an email using groovy script in Soap UI?

落花浮王杯 提交于 2019-12-13 09:14:12

问题


I want to send an automated email once all my test steps are passed in SOAP UI, using a groovy script test step?? Is there a way that we can achieve this ??


回答1:


You will have to use a Java library such as Simple Java Mail and call it from Groovy in a Groovy Script Test Step. You can add external jars in the bin/ext directory of your SoapUI install, and they will be added to the classpath next time the tool is started. If you use the samples from a library, you can use the Java, in most cases Java is valid Groovy. If the library examples have several classes, you should be able to have it all in one Groovy script.



来源:https://stackoverflow.com/questions/58290450/how-to-send-an-email-using-groovy-script-in-soap-ui

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!