Forum Discussion
Hi,
Yes, this is certainly possible. I did two recipes (custom reporting & emails via SMTP/Gmail) like this in my book.
I cannot share the code, but I can give you tips/pointers.
The are several options, but generally it takes some Groovy scripting & access to an SMTP server of some kind.
Here's one rough approach:
- Under the teardown script tab of either the TestCase or TestSuite, iterate over the TestCaseRunner.results collection e.g. for ( testCaseResult in runner.results ) {...}, build up your report as text/html/xml, whatever you need.
- Open an SMTP connection (plenty of java code examples that can be found and used in Groovy)
- Send your report data
Does this make sense as a starting point? (its easier than it may sound)
There is also a email TestStep plugin that you may be able to adapt:
https://sourceforge.net/projects/soapui-plugins/files/soapui-emailteststep-plugin/
https://github.com/olensmar/soapui-emailtestsstep-plugin
Regards,
Rupert
- shwetha9 years agoNew Contributor
Thanks for the reply.
Need inputs for below,
I have used groovy script to send Email but i want to know how to invoke groovy script for Testrunner command line and once the Testrunner is complete, it should attach the test report to the email and send it to the recipients
Is it possible ??
- nmrao9 years agoChampion Level 3Prefer to use Project's Teardown script for the same.
Related Content
- 5 years ago
- 7 years ago
Recent Discussions
- 15 years ago